Browse Source

Fix build

hlzbot-dirty
mittorn 8 years ago
parent
commit
4952358665
  1. 2
      dlls/Android.mk
  2. 1
      dlls/player.cpp
  3. 1
      dlls/player.h
  4. 25
      dlls/triggers.cpp

2
dlls/Android.mk

@ -14,7 +14,7 @@ LOCAL_MODULE_FILENAME = libserver_hardfp @@ -14,7 +14,7 @@ LOCAL_MODULE_FILENAME = libserver_hardfp
endif
LOCAL_CFLAGS += -D_LINUX -DCLIENT_WEAPONS -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -D_snprintf=snprintf \
-fno-exceptions -DNO_VOICEGAMEMGR
-fno-exceptions -DNO_VOICEGAMEMGR -Wno-conversion-null -Wno-write-strings -std=gnu++98 -Wno-invalid-offsetof
LOCAL_CPPFLAGS := $(LOCAL_CFLAGS) -frtti

1
dlls/player.cpp

@ -2787,6 +2787,7 @@ void CBasePlayer::Spawn( void ) @@ -2787,6 +2787,7 @@ void CBasePlayer::Spawn( void )
m_lastx = m_lasty = 0;
m_flNextChatTime = gpGlobals->time;
m_flSpawnTime = gpGlobals->time;
g_pGameRules->PlayerSpawn( this );
}

1
dlls/player.h

@ -310,6 +310,7 @@ public: @@ -310,6 +310,7 @@ public:
float m_flNextChatTime;
virtual float TouchGravGun( CBaseEntity *attacker, int stage );
float m_flSpawnTime;
};
#define AUTOAIM_2DEGREES 0.0348994967025

25
dlls/triggers.cpp

@ -1559,8 +1559,8 @@ void CChangeLevel::ChangeLevelNow( CBaseEntity *pActivator ) @@ -1559,8 +1559,8 @@ void CChangeLevel::ChangeLevelNow( CBaseEntity *pActivator )
{
CBaseEntity *plr = UTIL_PlayerByIndex( i );
// count only players in the transition volume
if( plr && InTransitionVolume( plr, m_szLandmarkName ) )
// count only players spawned more 90 seconds ago
if( plr && plr->IsPlayer() && (gpGlobals->time -((CBasePlayer*)plr)->m_flSpawnTime ) > 90 )
{
count2++;
char *ip = g_engfuncs.pfnInfoKeyValue( g_engfuncs.pfnGetInfoKeyBuffer( plr->edict() ), "ip" );
@ -1568,11 +1568,14 @@ void CChangeLevel::ChangeLevelNow( CBaseEntity *pActivator ) @@ -1568,11 +1568,14 @@ void CChangeLevel::ChangeLevelNow( CBaseEntity *pActivator )
// player touched trigger, save it's coordinates
if( m_uTouchCount & (i - 1) )
{
count1++;
strcpy(l_SavedCoords.ip[l_SavedCoords.iCount], ip );
l_SavedCoords.origin[l_SavedCoords.iCount] = plr->pev->origin;
l_SavedCoords.angles[l_SavedCoords.iCount] = plr->pev->angles;
l_SavedCoords.iCount++;
if( InTransitionVolume( plr, m_szLandmarkName ))
{
count1++;
strcpy(l_SavedCoords.ip[l_SavedCoords.iCount], ip );
l_SavedCoords.origin[l_SavedCoords.iCount] = plr->pev->origin;
l_SavedCoords.angles[l_SavedCoords.iCount] = plr->pev->angles;
l_SavedCoords.iCount++;
}
}
}
@ -1647,10 +1650,10 @@ void CChangeLevel::ChangeLevelNow( CBaseEntity *pActivator ) @@ -1647,10 +1650,10 @@ void CChangeLevel::ChangeLevelNow( CBaseEntity *pActivator )
}
}
// shedule remove first info_player_start
CBaseEntity *playerstart = FIND_ENTITY_BY_CLASSNAME( NULL, "info_player_start" );
if( playerstart )
playerstart->pev->flags |= FL_KILLME;
// shedule remove ke^w on first info_player_start
edict_t *playerstart = FIND_ENTITY_BY_CLASSNAME( NULL, "info_player_start" );
if( !FNullEnt(playerstart) )
playerstart->v.flags |= FL_KILLME;
// This object will get removed in the call to CHANGE_LEVEL, copy the params into "safe" memory
strcpy( st_szNextMap, m_szMapName );

Loading…
Cancel
Save