From ca226dcf8377fe654e8f4159ec441847443af82d Mon Sep 17 00:00:00 2001 From: Rafael Barreto Date: Wed, 19 May 2010 16:36:29 +0000 Subject: [PATCH] new nade values, and header inclusion in makefile git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4932 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/Makefile | 3 ++- source/src/server.cpp | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/source/src/Makefile b/source/src/Makefile index 98641f67..4789bd4c 100644 --- a/source/src/Makefile +++ b/source/src/Makefile @@ -1,3 +1,4 @@ +//CXX=g++-gcc-4.2.3 CXXFLAGS= -O3 -fomit-frame-pointer override CXXFLAGS+= -Wall -fsigned-char @@ -358,7 +359,7 @@ protocol-standalone.o: vote.h console.h protos.h hash.h server-standalone.o: cube.h platform.h tools.h geom.h model.h protocol.h server-standalone.o: sound.h weapon.h entity.h world.h i18n.h command.h server-standalone.o: vote.h console.h protos.h server.h servercontroller.h -server-standalone.o: serverfiles.h serverevents.h serveractions.h +server-standalone.o: serverfiles.h serverevents.h serveractions.h serverchecks.h serverms-standalone.o: cube.h platform.h tools.h geom.h model.h protocol.h serverms-standalone.o: sound.h weapon.h entity.h world.h i18n.h command.h serverms-standalone.o: vote.h console.h protos.h diff --git a/source/src/server.cpp b/source/src/server.cpp index 401c5bbf..aeb931d2 100644 --- a/source/src/server.cpp +++ b/source/src/server.cpp @@ -8,7 +8,6 @@ #include "server.h" #include "servercontroller.h" #include "serverfiles.h" -#include "serverchecks.h" // this is temporary, and will be let here for now for compatibility issues // config servercontroller *svcctrl = NULL; @@ -54,6 +53,8 @@ servermapbuffer mapbuffer; char *global_name; int clientnumber = 0; +#include "serverchecks.h" // this is temporary, and will be let here for now for compatibility issues + bool valid_client(int cn) { return clients.inrange(cn) && clients[cn]->type != ST_EMPTY; @@ -1221,8 +1222,8 @@ int spawntime(int type) switch(type) { case I_CLIPS: - case I_AMMO: - case I_GRENADE: sec = np*2; break; + case I_AMMO: sec = np*2; break; + case I_GRENADE: sec = 12; break; case I_HEALTH: sec = np*5; break; case I_HELMET: case I_ARMOUR: sec = 20; break; @@ -1303,7 +1304,7 @@ void serverdamage(client *target, client *actor, int damage, int gun, bool gib, target->state.deaths++; if(target!=actor) { - if(!isteam(target->team, actor->team)) actor->state.frags += gib ? 2 : 1; + if(!isteam(target->team, actor->team)) actor->state.frags += gib && gun != GUN_GRENADE ? 2 : 1; else { actor->state.frags--;