mirror of
https://github.com/UberGames/rpgxEF.git
synced 2024-11-14 00:40:34 +00:00
Moved list of self destruct safezone into level locals
This commit is contained in:
parent
2f85e31baf
commit
ca510f36a1
3 changed files with 9 additions and 5 deletions
|
@ -696,6 +696,10 @@ typedef struct {
|
||||||
|
|
||||||
int numBrushEnts; //!< number of entities in the level that use brushmodels
|
int numBrushEnts; //!< number of entities in the level that use brushmodels
|
||||||
|
|
||||||
|
// selft destruct safezones
|
||||||
|
list_p selfdestructSafeZones;
|
||||||
|
list_p locations;
|
||||||
|
|
||||||
} level_locals_t;
|
} level_locals_t;
|
||||||
|
|
||||||
|
|
||||||
|
@ -2042,7 +2046,6 @@ struct luaAlertState_s {
|
||||||
luaAlertState_t *luaAlertState;
|
luaAlertState_t *luaAlertState;
|
||||||
|
|
||||||
// self destruct
|
// self destruct
|
||||||
list_p selfdestructSafeZones;
|
|
||||||
typedef struct safeZone_s safeZone_t;
|
typedef struct safeZone_s safeZone_t;
|
||||||
struct safeZone_s {
|
struct safeZone_s {
|
||||||
char* name;
|
char* name;
|
||||||
|
@ -2051,4 +2054,5 @@ struct safeZone_s {
|
||||||
vec3_t mins;
|
vec3_t mins;
|
||||||
} safeZone_s;
|
} safeZone_s;
|
||||||
|
|
||||||
|
|
||||||
#endif //_G_LOCAL_H_
|
#endif //_G_LOCAL_H_
|
||||||
|
|
|
@ -2044,8 +2044,8 @@ void G_ShutdownGame( int restart ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// free self destruct safe zones
|
// free self destruct safe zones
|
||||||
if(selfdestructSafeZones != NULL) {
|
if(level.selfdestructSafeZones != NULL) {
|
||||||
destroy_list(selfdestructSafeZones);
|
destroy_list(level.selfdestructSafeZones);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SQL
|
#ifdef SQL
|
||||||
|
|
|
@ -509,8 +509,8 @@ void G_UseTargets2( gentity_t *ent, gentity_t *activator, char *target ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* self destruct safe zones */
|
/* self destruct safe zones */
|
||||||
if(selfdestructSafeZones != NULL && selfdestructSafeZones->length > 0) {
|
if(level.selfdestructSafeZones != NULL && level.selfdestructSafeZones->length > 0) {
|
||||||
szIter = list_iterator(selfdestructSafeZones, FRONT);
|
szIter = list_iterator(level.selfdestructSafeZones, FRONT);
|
||||||
for(sz = (safeZone_t *)list_next(szIter); sz != NULL; sz = (safeZone_t *)list_next(szIter)) {
|
for(sz = (safeZone_t *)list_next(szIter); sz != NULL; sz = (safeZone_t *)list_next(szIter)) {
|
||||||
if(!strcmp(sz->name, target)) {
|
if(!strcmp(sz->name, target)) {
|
||||||
sz->active = (qboolean)!sz->active;
|
sz->active = (qboolean)!sz->active;
|
||||||
|
|
Loading…
Reference in a new issue