diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-03-21 19:05:35 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-03-21 19:05:35 +0000 |
| commit | 48d4aa0e89df0160437bafa71b0f51e61ea0e727 (patch) | |
| tree | e7b44ee4ead2f8d811d872d661cfeaacea730f73 /src/game/server/gs_server.cpp | |
| parent | 45a047ce478e31297eba35e2e3121b25cabeae12 (diff) | |
| download | zcatch-48d4aa0e89df0160437bafa71b0f51e61ea0e727.tar.gz zcatch-48d4aa0e89df0160437bafa71b0f51e61ea0e727.zip | |
added the rifle to the maps and removed it from the starting inventory
Diffstat (limited to 'src/game/server/gs_server.cpp')
| -rw-r--r-- | src/game/server/gs_server.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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 |