Fixed the BreakModel PVS thing.

Now also loading 'valve' whenever present.
This commit is contained in:
Marco Hladik 2016-12-10 15:39:54 +01:00
parent b1b81e8728
commit dc95dd3c12
3 changed files with 11 additions and 5 deletions

View file

@ -68,7 +68,7 @@ void Rules_Restart( void ) {
entity eOld = self;
for ( entity eFind = world; eFind = find( eFind, classname, "player" ); ) {
for ( entity eFind = world; ( eFind = find( eFind, classname, "player" ) ); ) {
self = eFind;
if ( self.health > 0 ) {
@ -85,7 +85,7 @@ void Rules_Restart( void ) {
int iRandomT = floor( random( 1, (float)iAlivePlayers_T + 1 ) );
int iPickT = 0;
for ( entity eFind = world; eFind = find( eFind, classname, "player" ); ) {
for ( entity eFind = world; ( eFind = find( eFind, classname, "player" ) ); ) {
if ( eFind.team == TEAM_T ) {
iPickT++;
@ -102,7 +102,7 @@ void Rules_Restart( void ) {
int iRandomCT = floor( random( 1, (float)iAlivePlayers_CT + 1 ) );
int iPickCT = 0;
for ( entity eFind = world; eFind = find( eFind, classname, "player" ); ) {
for ( entity eFind = world; ( eFind = find( eFind, classname, "player" ) ); ) {
if ( eFind.team == TEAM_CT ) {
iPickCT++;
if ( iPickCT == iRandomCT ) {
@ -118,7 +118,7 @@ void Rules_Restart( void ) {
// Respawn all the entities
for ( entity eFind = world; eFind = findfloat( eFind, fRespawns, TRUE ); ) {
for ( entity eFind = world; ( eFind = findfloat( eFind, fRespawns, TRUE ) ); ) {
self = eFind;
Entities_Respawn();
}

View file

@ -58,7 +58,12 @@ void Effect_BreakModel( vector vMins, vector vMaxs, vector vVel, float fStyle )
WriteByte( MSG_MULTICAST, fStyle );
msg_entity = self;
multicast( '0 0 0', MULTICAST_ALL );
vector vWorldPos;
vWorldPos_x = vMins_x + ( 0.5 * ( vMaxs_x - vMins_x ) );
vWorldPos_y = vMins_y + ( 0.5 * ( vMaxs_y - vMins_y ) );
vWorldPos_z = vMins_z + ( 0.5 * ( vMaxs_z - vMins_z ) );
multicast( vWorldPos, MULTICAST_PVS );
#else
static void Effect_BreakModel_Remove( void ) { remove( self ) ; }

View file

@ -2,6 +2,7 @@ FTEMANIFEST 1
game cstrike
name "OpenCS"
protocolname "OPENCS"
basegame valve
basegame cstrike
basegame *opencs
disablehomedir 1