Skip to content

Commit 7d0cdce

Browse files
author
Jusonex
authored
Merge pull request #89 from lopezloo/bugfix/9418
Fixed #9418 (setElementFrozen directly after resource start not working)
2 parents 6d5272d + 7807d67 commit 7d0cdce

File tree

8 files changed

+16
-16
lines changed

8 files changed

+16
-16
lines changed

Client/game_sa/CPhysicalSA.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ void CPhysicalSA::SetFrozen ( bool bFrozen )
366366
{
367367
CPhysicalSAInterface * pInterface = (CPhysicalSAInterface *)this->GetInterface();
368368
// Set movement ability
369-
pInterface->bDisableMovement = bFrozen;
369+
pInterface->bDontApplySpeed = bFrozen;
370370
// Set rotation movement ability
371371
pInterface->bDisableFriction = bFrozen;
372372
}

Client/game_sa/CPhysicalSA.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class CPhysicalSAInterface : public CEntitySAInterface
5050
uint32 bBroken : 1;
5151
uint32 b0x800 : 1; // ref @ 0x6F5CF0
5252
uint32 b0x1000 : 1;//
53-
uint32 b0x2000 : 1;//
53+
uint32 bDontApplySpeed : 1;//
5454
uint32 b0x4000 : 1;//
5555
uint32 b0x8000 : 1;//
5656

Client/mods/deathmatch/logic/CPacketHandler.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2911,9 +2911,9 @@ void CPacketHandler::Packet_EntityAdd ( NetBitStreamInterface& bitStream )
29112911
}
29122912
pObject->SetScale ( vecScale );
29132913

2914-
bool bStatic;
2915-
if ( bitStream.ReadBit ( bStatic ) )
2916-
pObject->SetStatic ( bStatic );
2914+
bool bFrozen;
2915+
if ( bitStream.ReadBit ( bFrozen ) )
2916+
pObject->SetFrozen ( bFrozen );
29172917

29182918
SObjectHealthSync health;
29192919
if ( bitStream.Read ( &health ) )

Client/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3842,7 +3842,7 @@ bool CStaticFunctionDefinitions::SetObjectStatic ( CClientEntity& Entity, bool b
38423842
if ( IS_OBJECT ( &Entity ) )
38433843
{
38443844
CDeathmatchObject& Object = static_cast < CDeathmatchObject& > ( Entity );
3845-
Object.SetStatic ( bStatic );
3845+
Object.SetFrozen ( bStatic );
38463846
return true;
38473847
}
38483848

Server/mods/deathmatch/logic/CObject.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ CObject::CObject ( CElement* pParent, CXMLNode* pNode, CObjectManager* pObjectMa
3333
m_fHealth = 1000.0f;
3434
m_bSyncable = true;
3535
m_pSyncer = NULL;
36-
m_bIsStatic = false;
36+
m_bIsFrozen = false;
3737

3838
m_bCollisionsEnabled = true;
3939

@@ -171,7 +171,7 @@ bool CObject::ReadSpecialData ( void )
171171

172172
bool bFrozen;
173173
if ( GetCustomDataBool ( "frozen", bFrozen, true ) )
174-
m_bIsStatic = bFrozen;
174+
m_bIsFrozen = bFrozen;
175175

176176
// Success
177177
return true;

Server/mods/deathmatch/logic/CObject.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ class CObject : public CElement
6262
inline bool GetCollisionEnabled ( void ) { return m_bCollisionsEnabled; }
6363
inline void SetCollisionEnabled ( bool bCollisionEnabled ) { m_bCollisionsEnabled = bCollisionEnabled; }
6464

65-
inline bool IsStatic ( void ) { return m_bIsStatic; }
66-
inline void SetStatic ( bool bStatic ) { m_bIsStatic = bStatic; }
65+
inline bool IsFrozen ( void ) { return m_bIsFrozen; }
66+
inline void SetFrozen ( bool bFrozen ) { m_bIsFrozen = bFrozen; }
6767

6868
inline float GetHealth ( void ) { return m_fHealth; }
6969
inline void SetHealth ( float fHealth ) { m_fHealth = fHealth; }
@@ -84,7 +84,7 @@ class CObject : public CElement
8484
unsigned char m_ucAlpha;
8585
unsigned short m_usModel;
8686
CVector m_vecScale;
87-
bool m_bIsStatic;
87+
bool m_bIsFrozen;
8888
float m_fHealth;
8989
bool m_bBreakable;
9090
bool m_bSyncable;

Server/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ bool CStaticFunctionDefinitions::IsElementFrozen ( CElement* pElement, bool &bFr
924924
case CElement::OBJECT:
925925
{
926926
CObject* pObject = static_cast < CObject* > ( pElement );
927-
bFrozen = pObject->IsStatic ();
927+
bFrozen = pObject->IsFrozen ();
928928
break;
929929
}
930930
default: return false;
@@ -1938,7 +1938,7 @@ bool CStaticFunctionDefinitions::SetElementFrozen ( CElement* pElement, bool bFr
19381938
case CElement::OBJECT:
19391939
{
19401940
CObject * pObject = static_cast < CObject* > ( pElement );
1941-
pObject->SetStatic ( bFrozen );
1941+
pObject->SetFrozen ( bFrozen );
19421942
break;
19431943
}
19441944
default: return false;

Server/mods/deathmatch/logic/packets/CEntityAddPacket.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,9 @@ bool CEntityAddPacket::Write ( NetBitStreamInterface& BitStream ) const
275275
BitStream.Write( vecScale.fX );
276276
}
277277

278-
// Static
279-
bool bStatic = pObject->IsStatic ();
280-
BitStream.WriteBit ( bStatic );
278+
// Frozen
279+
bool bFrozen = pObject->IsFrozen ();
280+
BitStream.WriteBit ( bFrozen );
281281

282282
// Health
283283
SObjectHealthSync health;

0 commit comments

Comments
 (0)