fixed a seg fault on add weapon
This commit is contained in:
parent
065d543d4d
commit
d1a7053149
3 changed files with 123 additions and 157 deletions
5
Ship.cpp
5
Ship.cpp
|
|
@ -105,8 +105,5 @@ void Ship::setTarget(Ship *_target) {
|
|||
}
|
||||
|
||||
void Ship::addWeapon(Weapon *w) {
|
||||
Weapon *copiedWeapon;
|
||||
*copiedWeapon = *w;
|
||||
|
||||
weapons.push_back(copiedWeapon);
|
||||
weapons.push_back(w);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue