Added SVF_NOCLIENT to some entities

Most of them game logic entities such as target_boolean or target_warp.
This commit is contained in:
Walter Julius Hennecke 2012-01-20 20:53:31 +01:00
parent 4d99cb3e29
commit 03e1822a02
8 changed files with 60 additions and 21 deletions

View file

@ -111,7 +111,7 @@ static void CG_EntityEffects( centity_t *cent ) {
CG_SetEntitySoundPosition( cent ); CG_SetEntitySoundPosition( cent );
// add loop sound // add loop sound
if ( cent->currentState.loopSound ) { if ( cent->currentState.loopSound && cent->currentState.loopSound < 256 ) {
trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, vec3_origin, trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, vec3_origin,
cgs.gameSounds[ cent->currentState.loopSound ] ); cgs.gameSounds[ cent->currentState.loopSound ] );
} }

View file

@ -112,11 +112,9 @@ typedef enum {
CG_GETUSERCMD, CG_GETUSERCMD,
CG_SETUSERCMDVALUE, CG_SETUSERCMDVALUE,
CG_R_REGISTERSHADERNOMIP, CG_R_REGISTERSHADERNOMIP,
CG_MEMORY_REMAINING, //58 CG_MEMORY_REMAINING,
CG_R_REGISTERSHADER3D, //59 CG_R_REGISTERSHADER3D, //59
CG_CVAR_SET_NO_MODIFY, // 60 CG_CVAR_SET_NO_MODIFY, // 60
//these must match up with cg_syscalls.asm - add more traps HERE!
CG_MEMSET = 100, CG_MEMSET = 100,
CG_MEMCPY, CG_MEMCPY,
CG_STRNCPY, CG_STRNCPY,
@ -126,12 +124,10 @@ typedef enum {
CG_SQRT, CG_SQRT,
CG_FLOOR, CG_FLOOR,
CG_CEIL, CG_CEIL,
CG_TESTPRINTINT, CG_TESTPRINTINT,
CG_TESTPRINTFLOAT CG_TESTPRINTFLOAT,
#ifdef XTRA #ifdef XTRA
,
CG_R_REMAP_SHADER = 200, CG_R_REMAP_SHADER = 200,
CG_R_ADDPOLYSTOSCENE CG_R_ADDPOLYSTOSCENE
#endif #endif
@ -139,6 +135,7 @@ typedef enum {
//these must match up with cg_syscalls.asm //these must match up with cg_syscalls.asm
/* /*
================================================================== ==================================================================

View file

@ -96,7 +96,6 @@ static void CG_ParseHealthInfo( void ) {
cgs.clientinfo[ client ].health = atoi( CG_Argv( i * 2 + 3 ) ); cgs.clientinfo[ client ].health = atoi( CG_Argv( i * 2 + 3 ) );
} }
} }
/* /*
================ ================
CG_ParseServerinfo CG_ParseServerinfo

View file

@ -6,8 +6,7 @@
#define MAX_DLIGHTS 32 // can't be increased, because bit flags are used on surfaces #define MAX_DLIGHTS 32 // can't be increased, because bit flags are used on surfaces
#define MAX_ENTITIES 1023 // can't be increased without changing drawsurf bit packing #define MAX_ENTITIES 2047
// renderfx flags // renderfx flags
#define RF_LOWLIGHT 0x0001 // subtract ambient to keep it in the dark #define RF_LOWLIGHT 0x0001 // subtract ambient to keep it in the dark

View file

@ -5869,7 +5869,7 @@ void Cmd_AdminLogin_f( gentity_t *ent)
}*/ }*/
//Admin class login thingy //Admin class login thingy
//if( (Q_stricmp(arg, rpg_adminpass.string) == 0) && rpg_adminpass.string[0] ){ //if( (Q_stricmp(arg, rpg_adminpass.string) == 0) && rpg_adminpass.string[0] )
for ( j=0; g_classData[j].consoleName[0] && j < MAX_CLASSES; j++ ) for ( j=0; g_classData[j].consoleName[0] && j < MAX_CLASSES; j++ )
{ {
trap_Cvar_VariableStringBuffer( va( "rpg_%sPass", g_classData[j].consoleName ), classPass, sizeof(classPass) ); trap_Cvar_VariableStringBuffer( va( "rpg_%sPass", g_classData[j].consoleName ), classPass, sizeof(classPass) );

View file

@ -84,6 +84,10 @@ void SP_target_give( gentity_t *ent )
//Com_Printf( S_COLOR_RED "Final flags: %u\n", (ent->s.time) ); //Com_Printf( S_COLOR_RED "Final flags: %u\n", (ent->s.time) );
ent->use = Use_Target_Give; ent->use = Use_Target_Give;
// don't need to send this to clients
ent->r.svFlags &= SVF_NOCLIENT;
trap_LinkEntity(ent);
} }
@ -154,6 +158,10 @@ void SP_target_delay( gentity_t *ent ) {
} }
ent->count = (int)ent->wait; ent->count = (int)ent->wait;
ent->use = Use_Target_Delay; ent->use = Use_Target_Delay;
// don't need to send this to clients
ent->r.svFlags &= SVF_NOCLIENT;
trap_LinkEntity(ent);
} }
@ -556,6 +564,10 @@ void target_kill_use( gentity_t *self, gentity_t *other, gentity_t *activator )
void SP_target_kill( gentity_t *self ) { void SP_target_kill( gentity_t *self ) {
self->use = target_kill_use; self->use = target_kill_use;
// don't need to send this to clients
self->r.svFlags &= SVF_NOCLIENT;
trap_LinkEntity(self);
} }
/*QUAKED target_position (0 0.5 0) (-4 -4 -4) (4 4 4) /*QUAKED target_position (0 0.5 0) (-4 -4 -4) (4 4 4)
@ -651,6 +663,10 @@ void SP_target_counter (gentity_t *self)
} }
self->use = target_counter_use; self->use = target_counter_use;
// don't need to send this to clients
self->r.svFlags &= SVF_NOCLIENT;
trap_LinkEntity(self);
} }
/*QUAKED target_objective (1.0 0 0) (-4 -4 -4) (4 4 4) /*QUAKED target_objective (1.0 0 0) (-4 -4 -4) (4 4 4)
@ -782,6 +798,10 @@ void SP_target_boolean (gentity_t *self) {
} }
self->use = target_boolean_use; self->use = target_boolean_use;
// don't need to send this to clients
self->r.svFlags &= SVF_NOCLIENT;
trap_LinkEntity(self);
} }
/*QUAKED target_gravity (.5 .5 .5) (-8 -8 -8) (8 8 8) PLAYER_ONLY MAP_GRAV /*QUAKED target_gravity (.5 .5 .5) (-8 -8 -8) (8 8 8) PLAYER_ONLY MAP_GRAV
@ -822,6 +842,10 @@ void SP_target_gravity (gentity_t *self) {
if(self->count) // support for SP if(self->count) // support for SP
self->targetname2 = G_NewString(va("%i", self->count)); self->targetname2 = G_NewString(va("%i", self->count));
self->use = target_gravity_use; self->use = target_gravity_use;
// don't need to send this to clients
self->r.svFlags &= SVF_NOCLIENT;
trap_LinkEntity(self);
} }
/*QUAKED target_shake (.5 .5 .5) (-8 -8 -8) (8 8 8) /*QUAKED target_shake (.5 .5 .5) (-8 -8 -8) (8 8 8)
@ -872,6 +896,10 @@ void target_evosuit_use (gentity_t *self, gentity_t *other, gentity_t *activator
void SP_target_evosuit (gentity_t *self) { void SP_target_evosuit (gentity_t *self) {
self->use = target_evosuit_use; self->use = target_evosuit_use;
// don't need to send this to clients
self->r.svFlags &= SVF_NOCLIENT;
trap_LinkEntity(self);
} }
//================================================================================== //==================================================================================
@ -1731,6 +1759,10 @@ void SP_target_doorLock(gentity_t *ent) {
G_SpawnString("unlockMsg", "", &temp); G_SpawnString("unlockMsg", "", &temp);
ent->truename = G_NewString(temp); ent->truename = G_NewString(temp);
ent->use = target_doorLock_use; ent->use = target_doorLock_use;
// don't need to send this to clients
ent->r.svFlags &= SVF_NOCLIENT;
trap_LinkEntity(ent);
} }
//RPG-X | GSIO01 | 11/05/2009 | MOD START //RPG-X | GSIO01 | 11/05/2009 | MOD START
@ -2514,6 +2546,10 @@ void SP_target_alert(gentity_t *ent) {
ent->damage = 0; ent->damage = 0;
ent->health = !(ent->spawnflags & 2); ent->health = !(ent->spawnflags & 2);
// don't need to send this to clients
ent->r.svFlags &= SVF_NOCLIENT;
trap_LinkEntity(ent);
} }
//RPG-X | GSIO01 | 11/05/2009 | MOD END //RPG-X | GSIO01 | 11/05/2009 | MOD END
@ -2681,6 +2717,9 @@ void SP_target_warp(gentity_t *ent) {
ent->use = target_warp_use; ent->use = target_warp_use;
// don't need to send this to clients
ent->r.svFlags &= SVF_NOCLIENT;
trap_LinkEntity(ent);
} }
//RPG-X | GSIO01 | 19/05/2009 | MOD END //RPG-X | GSIO01 | 19/05/2009 | MOD END
@ -2706,6 +2745,10 @@ void SP_target_deactivate(gentity_t *ent) {
} }
ent->use = target_deactivate_use; ent->use = target_deactivate_use;
// don't need to send this to clients
ent->r.svFlags &= SVF_NOCLIENT;
trap_LinkEntity(ent);
} }
/*QUAKED target_serverchange (1 0 0) (-8 -8 -8) (8 8 8) START_ON /*QUAKED target_serverchange (1 0 0) (-8 -8 -8) (8 8 8) START_ON
@ -2826,7 +2869,12 @@ void SP_target_levelchange(gentity_t *ent) {
*/ */
void SP_target_holodeck(gentity_t *ent) { void SP_target_holodeck(gentity_t *ent) {
G_FreeEntity(ent);
return;
// don't need to send this to clients
ent->r.svFlags &= SVF_NOCLIENT;
trap_LinkEntity(ent);
} }
//RPG-X | Harry Young | 15/10/2011 | MOD START //RPG-X | Harry Young | 15/10/2011 | MOD START

View file

@ -1167,10 +1167,6 @@ typedef struct entityState_s {
int generic1; int generic1;
int generic2; int generic2;
#endif #endif
#ifdef XTRA
int healthPercent; // XTRA
#endif
} entityState_t; } entityState_t;
typedef enum { typedef enum {

Binary file not shown.