diff options
| author | xalduin <xalduin@gmail.com> | 2010-06-10 00:24:38 +0800 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2010-06-10 20:38:03 +0800 |
| commit | dc3feaf42cd8bcb22b04fdba17dc10caacc94fef (patch) | |
| tree | b19550f37ecf1b2e4ed2561e6647e659fb560bf5 /src/game/server | |
| parent | 7fa21400d6739de935b2a13ceeefa32dbbb95986 (diff) | |
| download | zcatch-dc3feaf42cd8bcb22b04fdba17dc10caacc94fef.tar.gz zcatch-dc3feaf42cd8bcb22b04fdba17dc10caacc94fef.zip | |
Fixed remaining compiler warnings for gcc on Linux
Diffstat (limited to 'src/game/server')
| -rw-r--r-- | src/game/server/entities/character.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/game/server/entities/character.cpp b/src/game/server/entities/character.cpp index 77d8f462..81d1f85b 100644 --- a/src/game/server/entities/character.cpp +++ b/src/game/server/entities/character.cpp @@ -585,14 +585,26 @@ void CCharacter::TickDefered() if(!StuckBefore && (StuckAfterMove || StuckAfterQuant)) { + // Hackish solution to get rid of strict-aliasing warning + union + { + float f; + unsigned u; + }StartPosX, StartPosY, StartVelX, StartVelY; + + StartPosX.f = StartPos.x; + StartPosY.f = StartPos.y; + StartVelX.f = StartVel.x; + StartVelY.f = StartVel.y; + dbg_msg("char_core", "STUCK!!! %d %d %d %f %f %f %f %x %x %x %x", StuckBefore, StuckAfterMove, StuckAfterQuant, StartPos.x, StartPos.y, StartVel.x, StartVel.y, - *((unsigned *)&StartPos.x), *((unsigned *)&StartPos.y), - *((unsigned *)&StartVel.x), *((unsigned *)&StartVel.y)); + StartPosX.u, StartPosY.u, + StartVelX.u, StartVelY.u); } int Events = m_Core.m_TriggeredEvents; |