Closed DivFord closed 9 years ago
According to gdb this is caused by a call to std::vector::size on line 101 of Gun.cpp. This is pretty impressive in iteself as the Gun instance at this point actually seems to have a memory address of 0x0. In any case the bullets vector doesn't appear to be initialised, as it also has an invalid memory address.
EDIT But yes in reply to your comment perhaps a "unarmed" weapon would be useful here.
Which is funny, since the robot is currently missing an arm… Maybe a sprite for the "unarmed" weapon is in order at some point.
Graphics aside, he now doesn't try to shoot if he's not holding a gun. This should stop the crashing.
Do we not have a gun in the intro scene? Because firing in the into crashes the game. Would it be worth adding a "None" gun that we assign at startup?