diff options
Diffstat (limited to 'src/game/server')
| -rw-r--r-- | src/game/server/gs_game.cpp | 5 | ||||
| -rw-r--r-- | src/game/server/gs_server.cpp | 8 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/game/server/gs_game.cpp b/src/game/server/gs_game.cpp index 74bb8569..6482fc3d 100644 --- a/src/game/server/gs_game.cpp +++ b/src/game/server/gs_game.cpp @@ -65,6 +65,11 @@ bool gameobject::on_entity(int index, vec2 pos) type = POWERUP_WEAPON; subtype = WEAPON_GRENADE; } + else if(index == ENTITY_WEAPON_RIFLE) + { + type = POWERUP_WEAPON; + subtype = WEAPON_RIFLE; + } else if(index == ENTITY_POWERUP_NINJA) { type = POWERUP_NINJA; diff --git a/src/game/server/gs_server.cpp b/src/game/server/gs_server.cpp index 8b9e406f..7eae91e6 100644 --- a/src/game/server/gs_server.cpp +++ b/src/game/server/gs_server.cpp @@ -854,8 +854,8 @@ void player::try_respawn() weapons[WEAPON_GUN].got = true; weapons[WEAPON_GUN].ammo = data->weapons[WEAPON_GUN].maxammo; - weapons[WEAPON_RIFLE].got = true; - weapons[WEAPON_RIFLE].ammo = -1; + /*weapons[WEAPON_RIFLE].got = true; + weapons[WEAPON_RIFLE].ammo = -1;*/ active_weapon = WEAPON_GUN; last_weapon = WEAPON_HAMMER; @@ -1648,10 +1648,10 @@ void powerup::tick() case POWERUP_WEAPON: if(subtype >= 0 && subtype < NUM_WEAPONS) { - if(pplayer->weapons[subtype].ammo < 10 || !pplayer->weapons[subtype].got) + if(pplayer->weapons[subtype].ammo < data->weapons[subtype].maxammo || !pplayer->weapons[subtype].got) { pplayer->weapons[subtype].got = true; - pplayer->weapons[subtype].ammo = min(10, pplayer->weapons[subtype].ammo + data->powerupinfo[type].amount); + pplayer->weapons[subtype].ammo = min(data->weapons[subtype].maxammo, pplayer->weapons[subtype].ammo + data->powerupinfo[type].amount); respawntime = data->powerupinfo[type].respawntime; // TODO: data compiler should take care of stuff like this |