# HG changeset patch # User Adam Kaminski # Date 1621355265 14400 # Tue May 18 12:27:45 2021 -0400 # Node ID 64d89a5c4cc7bd5a7453d15a6f77a28dab8bf8e8 # Parent e1c7fbdc4de9390586800430f5c413495740a58a Removed the 'l' prefix from the NetID variable defined in AActor. diff -r e1c7fbdc4de9 -r 64d89a5c4cc7 protocolspec/generator/parametertypes.py --- a/protocolspec/generator/parametertypes.py Tue May 18 12:19:42 2021 -0400 +++ b/protocolspec/generator/parametertypes.py Tue May 18 12:27:45 2021 -0400 @@ -250,7 +250,7 @@ allownull=('nullallowed' in self.attributes) and 'true' or 'false', **locals())) def writesend(self, writer, command, reference, **args): - writer.writeline('command.addShort( this->{reference} ? this->{reference}->lNetID : -1 );'.format(**locals())) + writer.writeline('command.addShort( this->{reference} ? this->{reference}->NetID : -1 );'.format(**locals())) # ---------------------------------------------------------------------------------------------------------------------- diff -r e1c7fbdc4de9 -r 64d89a5c4cc7 src/actor.h --- a/src/actor.h Tue May 18 12:19:42 2021 -0400 +++ b/src/actor.h Tue May 18 12:27:45 2021 -0400 @@ -1136,8 +1136,7 @@ int FixedColormap; // ID used to identify this actor over network games. - // [EP] TODO: remove the 'l' prefix from this variable, it isn't LONG anymore - int lNetID; + int NetID; // Pointer to the pickup spot this item was spawned from. ABaseMonsterInvasionSpot *pMonsterSpot; diff -r e1c7fbdc4de9 -r 64d89a5c4cc7 src/c_cmds.cpp --- a/src/c_cmds.cpp Tue May 18 12:19:42 2021 -0400 +++ b/src/c_cmds.cpp Tue May 18 12:27:45 2021 -0400 @@ -1261,7 +1261,7 @@ if (linetarget) { // [TP] If we're the client, ask the server for information about the linetarget. - if ( NETWORK_GetState() == NETSTATE_CLIENT && linetarget->lNetID != -1 ) + if ( NETWORK_GetState() == NETSTATE_CLIENT && linetarget->NetID != -1 ) { CLIENTCOMMANDS_InfoCheat( linetarget, false ); return; @@ -1286,7 +1286,7 @@ if (linetarget) { // [TP] If we're the client, ask the server for information about the linetarget. - if ( NETWORK_GetState() == NETSTATE_CLIENT && linetarget->lNetID != -1 ) + if ( NETWORK_GetState() == NETSTATE_CLIENT && linetarget->NetID != -1 ) { CLIENTCOMMANDS_InfoCheat( linetarget, true ); return; @@ -1612,7 +1612,7 @@ while ( (mo = it.Next()) ) { numActors++; - if ( mo->lNetID > 0 ) + if ( mo->NetID > 0 ) numActorsWithNetID++; const FName curName = mo->GetClass()->TypeName.GetChars(); if ( actorCountMap.CheckKey( curName ) == NULL ) diff -r e1c7fbdc4de9 -r 64d89a5c4cc7 src/cl_commands.cpp --- a/src/cl_commands.cpp Tue May 18 12:19:42 2021 -0400 +++ b/src/cl_commands.cpp Tue May 18 12:27:45 2021 -0400 @@ -733,11 +733,11 @@ // [Dusk] void CLIENTCOMMANDS_InfoCheat( AActor* mobj, bool extended ) { - if ( mobj == NULL || mobj->lNetID == -1 ) + if ( mobj == NULL || mobj->NetID == -1 ) return; CLIENT_GetLocalBuffer( )->ByteStream.WriteByte( CLC_INFOCHEAT ); - CLIENT_GetLocalBuffer( )->ByteStream.WriteShort( mobj->lNetID ); + CLIENT_GetLocalBuffer( )->ByteStream.WriteShort( mobj->NetID ); CLIENT_GetLocalBuffer( )->ByteStream.WriteByte( extended ); } diff -r e1c7fbdc4de9 -r 64d89a5c4cc7 src/cl_main.cpp --- a/src/cl_main.cpp Tue May 18 12:19:42 2021 -0400 +++ b/src/cl_main.cpp Tue May 18 12:27:45 2021 -0400 @@ -2580,7 +2580,7 @@ } } - pActor->lNetID = lNetID; + pActor->NetID = lNetID; g_NetIDList.useID ( lNetID, pActor ); pActor->SpawnPoint[0] = X; @@ -2655,7 +2655,7 @@ // Derive the thing's angle from its velocity. pActor->angle = R_PointToAngle2( 0, 0, VelX, VelY ); - pActor->lNetID = lNetID; + pActor->NetID = lNetID; g_NetIDList.useID ( lNetID, pActor ); // Play the seesound if this missile has one. @@ -3470,7 +3470,7 @@ players[consoleplayer].camera = pPlayer->mo; // Set the network ID. - pPlayer->mo->lNetID = netid; + pPlayer->mo->NetID = netid; g_NetIDList.useID ( netid, pPlayer->mo ); // Set the spectator variables [after G_PlayerReborn so our data doesn't get lost] [BB] Why?. diff -r e1c7fbdc4de9 -r 64d89a5c4cc7 src/cooperative.cpp --- a/src/cooperative.cpp Tue May 18 12:19:42 2021 -0400 +++ b/src/cooperative.cpp Tue May 18 12:27:45 2021 -0400 @@ -196,8 +196,8 @@ // [BB] The clients will not spawn the doll, so mark it accordingly and free it's network ID. pDoll->NetworkFlags |= NETFL_SERVERSIDEONLY; - g_NetIDList.freeID ( pDoll->lNetID ); - pDoll->lNetID = -1; + g_NetIDList.freeID ( pDoll->NetID ); + pDoll->NetID = -1; // [BB] If we would just set the player pointer to NULL, a lot of things wouldn't work // at all for the voodoo dolls (e.g. floor scrollers), so we set it do a pointer to a diff -r e1c7fbdc4de9 -r 64d89a5c4cc7 src/g_level.cpp --- a/src/g_level.cpp Tue May 18 12:19:42 2021 -0400 +++ b/src/g_level.cpp Tue May 18 12:27:45 2021 -0400 @@ -1816,7 +1816,7 @@ G_CooperativeSpawnPlayer( pawn->player - players, false, true ); // [BC] - lSavedNetID = pawndup->lNetID; + lSavedNetID = pawndup->NetID; pawndup = pawn->player->mo; if (!(changeflags & CHANGELEVEL_KEEPFACING)) { @@ -1854,8 +1854,8 @@ pawn->player->SendPitchLimits(); // [BC] - pawn->lNetID = lSavedNetID; - g_NetIDList.useID ( pawn->lNetID, pawn ); + pawn->NetID = lSavedNetID; + g_NetIDList.useID ( pawn->NetID, pawn ); for (inv = pawn->Inventory; inv != NULL; inv = inv->Inventory) { diff -r e1c7fbdc4de9 -r 64d89a5c4cc7 src/network.cpp --- a/src/network.cpp Tue May 18 12:19:42 2021 -0400 +++ b/src/network.cpp Tue May 18 12:27:45 2021 -0400 @@ -1322,7 +1322,7 @@ if ( pActor == NULL ) return false; - return ( ( pActor->NetworkFlags & NETFL_CLIENTSIDEONLY ) || ( pActor->lNetID == -1 ) ); + return ( ( pActor->NetworkFlags & NETFL_CLIENTSIDEONLY ) || ( pActor->NetID == -1 ) ); } //***************************************************************************** diff -r e1c7fbdc4de9 -r 64d89a5c4cc7 src/p_map.cpp --- a/src/p_map.cpp Tue May 18 12:19:42 2021 -0400 +++ b/src/p_map.cpp Tue May 18 12:27:45 2021 -0400 @@ -4501,7 +4501,7 @@ if (killPuff && puff != NULL) { // [BB] Remove the temporary puff from the clients. - if ( ( NETWORK_GetState( ) == NETSTATE_SERVER ) && ( puff->lNetID != -1 ) ) + if ( ( NETWORK_GetState( ) == NETSTATE_SERVER ) && ( puff->NetID != -1 ) ) SERVERCOMMANDS_DestroyThing( puff ); puff->Destroy(); diff -r e1c7fbdc4de9 -r 64d89a5c4cc7 src/p_mobj.cpp --- a/src/p_mobj.cpp Tue May 18 12:19:42 2021 -0400 +++ b/src/p_mobj.cpp Tue May 18 12:27:45 2021 -0400 @@ -368,7 +368,7 @@ arc << LimitedToTeam // [BB] << FixedColormap // [BB] // [BB] Before the snapshot is loaded, player bodies are spawned, which invalidates the old netIDs. - //<< lNetID // [BC] We need to archive this so that it's restored properly when going between maps in a hub. + //<< NetID // [BC] We need to archive this so that it's restored properly when going between maps in a hub. << STFlags << NetworkFlags << InvasionWave @@ -392,8 +392,8 @@ // [BB] If the the actor needs one, generate a new netID. if ( !( NetworkFlags & NETFL_NONETID ) && !( NetworkFlags & NETFL_SERVERSIDEONLY ) ) { - lNetID = g_NetIDList.getNewID( ); - g_NetIDList.useID ( lNetID, this ); + NetID = g_NetIDList.getNewID( ); + g_NetIDList.useID ( NetID, this ); } touching_sectorlist = NULL; @@ -4759,8 +4759,8 @@ while ( (pActor = it.Next()) ) { - if (( pActor->lNetID > 0 ) && ( pActor->lNetID < MAX_NETID )) - useID ( pActor->lNetID, pActor ); + if (( pActor->NetID > 0 ) && ( pActor->NetID < MAX_NETID )) + useID ( pActor->NetID, pActor ); } } @@ -4822,8 +4822,8 @@ void AActor::FreeNetID () { - g_NetIDList.freeID ( lNetID ); - lNetID = -1; + g_NetIDList.freeID ( NetID ); + NetID = -1; } //========================================================================== @@ -5036,13 +5036,13 @@ if ((( actor->NetworkFlags & NETFL_NONETID ) == false ) && ( ( actor->NetworkFlags & NETFL_SERVERSIDEONLY ) == false ) && ( NETWORK_InClientMode() == false )) { - actor->lNetID = g_NetIDList.getNewID( ); - g_NetIDList.useID ( actor->lNetID, actor ); + actor->NetID = g_NetIDList.getNewID( ); + g_NetIDList.useID ( actor->NetID, actor ); if ( ( NETWORK_GetState( ) == NETSTATE_SERVER ) && sv_showspawnnames ) - Printf ( "%s %d\n", actor->GetClass()->TypeName.GetChars(), actor->lNetID ); + Printf ( "%s %d\n", actor->GetClass()->TypeName.GetChars(), actor->NetID ); } else - actor->lNetID = -1; + actor->NetID = -1; // [BB] Initilize the colormap of this actor. actor->FixedColormap = NOFIXEDCOLORMAP; @@ -5259,9 +5259,9 @@ void AActor::Destroy () { // [BC/BB] Free it's network ID. - g_NetIDList.freeID ( lNetID ); - - lNetID = -1; + g_NetIDList.freeID ( NetID ); + + NetID = -1; // [BB] If this is a monster corpse, we potentially have to NULL out the reference to it. if ( invasion ) @@ -6410,10 +6410,10 @@ else if (( (flags & PF_HITTHING) && puff->SeeSound ) || ( puff->AttackSound ) || ( ( puff->GetClass()->Meta.GetMetaString (AMETA_Obituary) != NULL ) && ( flags & PF_TEMPORARY ) ) ) { - if ( puff->lNetID == -1 ) + if ( puff->NetID == -1 ) { - puff->lNetID = g_NetIDList.getNewID( ); - g_NetIDList.useID ( puff->lNetID , puff ); + puff->NetID = g_NetIDList.getNewID( ); + g_NetIDList.useID ( puff->NetID , puff ); } SERVERCOMMANDS_SpawnPuff( puff ); diff -r e1c7fbdc4de9 -r 64d89a5c4cc7 src/sv_commands.cpp --- a/src/sv_commands.cpp Tue May 18 12:19:42 2021 -0400 +++ b/src/sv_commands.cpp Tue May 18 12:27:45 2021 -0400 @@ -107,7 +107,7 @@ if ( pActor == NULL ) return false; - if ( pActor->lNetID == -1 ) + if ( pActor->NetID == -1 ) { if ( sv_showwarnings && !( pActor->NetworkFlags & NETFL_SERVERSIDEONLY ) ) Printf ( "Warning: Actor %s doesn't have a netID and therefore can't be manipulated online!\n", pActor->GetClass()->TypeName.GetChars() ); @@ -258,7 +258,7 @@ command.SetIsSpectating( players[ulPlayer].bSpectating ); command.SetIsDeadSpectator( players[ulPlayer].bDeadSpectator ); command.SetIsMorphed( bMorph ); - command.SetNetid( players[ulPlayer].mo->lNetID ); + command.SetNetid( players[ulPlayer].mo->NetID ); command.SetAngle( players[ulPlayer].mo->angle ); command.SetX( players[ulPlayer].mo->x ); command.SetY( players[ulPlayer].mo->y ); @@ -1201,7 +1201,7 @@ return; // If the actor doesn't have a network ID, it's better to send it ID-less. - if ( pActor->lNetID == -1 ) + if ( pActor->NetID == -1 ) { SERVERCOMMANDS_SpawnThingNoNetID( pActor, ulPlayerExtra, flags ); return; @@ -1212,7 +1212,7 @@ command.SetX( pActor->x ); command.SetY( pActor->y ); command.SetZ( pActor->z ); - command.SetId( pActor->lNetID ); + command.SetId( pActor->NetID ); command.sendCommandToClients( ulPlayerExtra, flags ); if ( pActor->STFlags & STFL_LEVELSPAWNED ) @@ -1247,7 +1247,7 @@ return; // If the actor doesn't have a network ID, it's better to send it ID-less. - if ( pActor->lNetID == -1 ) + if ( pActor->NetID == -1 ) { SERVERCOMMANDS_SpawnThingExactNoNetID( pActor, ulPlayerExtra, flags ); return; @@ -1258,7 +1258,7 @@ command.SetX( pActor->x ); command.SetY( pActor->y ); command.SetZ( pActor->z ); - command.SetId( pActor->lNetID ); + command.SetId( pActor->NetID ); command.sendCommandToClients( ulPlayerExtra, flags ); } @@ -1288,7 +1288,7 @@ return; // If the actor doesn't have a network ID, it's better to send it ID-less. - if ( pActor->lNetID == -1 ) + if ( pActor->NetID == -1 ) { SERVERCOMMANDS_LevelSpawnThingNoNetID( pActor, ulPlayerExtra, flags ); return; @@ -1299,7 +1299,7 @@ command.SetX( pActor->x ); command.SetY( pActor->y ); command.SetZ( pActor->z ); - command.SetId( pActor->lNetID ); + command.SetId( pActor->NetID ); command.sendCommandToClients( ulPlayerExtra, flags ); } @@ -1714,7 +1714,7 @@ return; NetCommand command( SVC2_SETTHINGSPECIAL ); - command.addShort( pActor->lNetID ); + command.addShort( pActor->NetID ); command.addShort( pActor->special ); command.sendCommandToClients( ulPlayerExtra, flags ); } @@ -2029,7 +2029,7 @@ return; // If the actor doesn't have a network ID, it's better to send it ID-less. - if ( pActor->lNetID == -1 ) + if ( pActor->NetID == -1 ) { ULONG ulState = STATE_SPAWN; if ( pActor->state == pActor->MeleeState ) @@ -2046,7 +2046,7 @@ command.SetY( pActor->y ); command.SetZ( pActor->z ); command.SetPufftype( pActor->GetClass( ) ); - command.SetId( pActor->lNetID ); + command.SetId( pActor->NetID ); command.sendCommandToClients( ulPlayerExtra, flags ); } @@ -2526,10 +2526,10 @@ command.SetVelY( pMissile->vely ); command.SetVelZ( pMissile->velz ); command.SetMissileType( pMissile->GetClass() ); - command.SetNetID( pMissile->lNetID ); + command.SetNetID( pMissile->NetID ); if ( pMissile->target ) - command.SetTargetNetID( pMissile->target->lNetID ); + command.SetTargetNetID( pMissile->target->NetID ); else command.SetTargetNetID( -1 ); @@ -2560,10 +2560,10 @@ command.SetVelY( pMissile->vely ); command.SetVelZ( pMissile->velz ); command.SetMissileType( pMissile->GetClass() ); - command.SetNetID( pMissile->lNetID ); + command.SetNetID( pMissile->NetID ); if ( pMissile->target ) - command.SetTargetNetID( pMissile->target->lNetID ); + command.SetTargetNetID( pMissile->target->NetID ); else command.SetTargetNetID( -1 ); @@ -3325,7 +3325,7 @@ return; // [BB] If the actor doesn't have a NetID, we have to instruct the clients differently how to play the sound. - if ( pActor->lNetID == -1 ) + if ( pActor->NetID == -1 ) { SERVERCOMMANDS_SoundPoint( pActor->x, pActor->y, pActor->z, lChannel, pszSound, fVolume, fAttenuation, ulPlayerExtra, flags ); return; @@ -3823,7 +3823,7 @@ return; NetCommand command( SVC2_SETFASTCHASESTRAFECOUNT ); - command.addShort( mobj->lNetID ); + command.addShort( mobj->NetID ); command.addByte( mobj->FastChaseStrafeCount ); command.sendCommandToClients( ulPlayerExtra, flags ); } @@ -3841,7 +3841,7 @@ return; NetCommand command( SVC2_SETTHINGHEALTH ); - command.addShort( mobj->lNetID ); + command.addShort( mobj->NetID ); command.addByte( mobj->health ); command.sendCommandToClients( ulPlayerExtra, flags ); } @@ -3857,7 +3857,7 @@ return; NetCommand command( SVC2_SETTHINGSCALE ); - command.addShort( mobj->lNetID ); + command.addShort( mobj->NetID ); command.addByte( scaleFlags ); if ( scaleFlags & ACTORSCALE_X ) command.addLong( mobj->scaleX ); @@ -3874,7 +3874,7 @@ return; NetCommand command( SVC2_SETTHINGSPECIES ); - command.addShort( mobj->lNetID ); + command.addShort( mobj->NetID ); command.addString( mobj->Species ); command.sendCommandToClients( ulPlayerExtra, flags ); } @@ -3905,7 +3905,7 @@ return; NetCommand command ( SVC2_FLASHSTEALTHMONSTER ); - command.addShort( pActor->lNetID ); + command.addShort( pActor->NetID ); command.sendCommandToClients(); } @@ -3966,7 +3966,7 @@ return; NetCommand command ( SVC2_PLAYBOUNCESOUND ); - command.addShort ( pActor->lNetID ); + command.addShort ( pActor->NetID ); command.addByte ( bOnfloor ); command.sendCommandToClients ( ulPlayerExtra, flags ); } @@ -4535,7 +4535,7 @@ const char *pszQuakeSound = S_GetName( Quakesound ); NetCommand command ( SVC_EARTHQUAKE ); - command.addShort ( pCenter->lNetID ); + command.addShort ( pCenter->NetID ); command.addByte ( lIntensity ); command.addShort ( lDuration ); command.addShort ( lTemorRadius ); @@ -4668,7 +4668,7 @@ } NetCommand command ( SVC_SETCAMERATOTEXTURE ); - command.addShort ( pCamera->lNetID ); + command.addShort ( pCamera->NetID ); command.addString ( pszTexture ); command.addByte ( lFOV ); command.sendCommandToClients ( ulPlayerExtra, flags ); @@ -4764,7 +4764,7 @@ void SERVERCOMMANDS_DoPusher( ULONG ulType, line_t *pLine, int iMagnitude, int iAngle, AActor *pSource, int iAffectee, ULONG ulPlayerExtra, ServerCommandFlags flags ) { const int iLineNum = pLine ? static_cast( pLine - lines ) : -1; - const LONG lSourceNetID = pSource ? pSource->lNetID : -1; + const LONG lSourceNetID = pSource ? pSource->NetID : -1; NetCommand command ( SVC_DOPUSHER ); command.addByte ( ulType ); @@ -4857,7 +4857,7 @@ void SERVERCOMMANDS_SetDefaultSkybox( ULONG ulPlayerExtra, ServerCommandFlags flags ) { NetCommand command( SVC2_SETDEFAULTSKYBOX ); - command.addShort( ( level.DefaultSkybox != NULL ) ? level.DefaultSkybox->lNetID : -1 ); + command.addShort( ( level.DefaultSkybox != NULL ) ? level.DefaultSkybox->NetID : -1 ); command.sendCommandToClients( ulPlayerExtra, flags ); } //***************************************************************************** @@ -4912,7 +4912,7 @@ NetCommand command ( SVC2_SHOOTDECAL ); command.addName( tpl->GetName() ); - command.addShort( actor->lNetID ); + command.addShort( actor->NetID ); command.addShort( z >> FRACBITS ); command.addShort( angle >> FRACBITS ); command.addLong( tracedist ); @@ -4939,9 +4939,9 @@ return; NetCommand command( SVC2_SYNCPATHFOLLOWER ); - command.addShort( this->lNetID ); - command.addShort( this->CurrNode ? this->CurrNode->lNetID : -1 ); - command.addShort( this->PrevNode ? this->PrevNode->lNetID : -1 ); + command.addShort( this->NetID ); + command.addShort( this->CurrNode ? this->CurrNode->NetID : -1 ); + command.addShort( this->PrevNode ? this->PrevNode->NetID : -1 ); command.addFloat( this->Time ); command.sendCommandToOneClient( ulClient ); } diff -r e1c7fbdc4de9 -r 64d89a5c4cc7 src/sv_main.cpp --- a/src/sv_main.cpp Tue May 18 12:19:42 2021 -0400 +++ b/src/sv_main.cpp Tue May 18 12:27:45 2021 -0400 @@ -2461,7 +2461,7 @@ { // If the actor doesn't have a network ID, don't spawn it (it // probably isn't important). - if ( pActor->lNetID == -1 ) + if ( pActor->NetID == -1 ) continue; // [BB] The other clients already have destroyed this actor, so don't spawn it.