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 | |
| parent | 7fa21400d6739de935b2a13ceeefa32dbbb95986 (diff) | |
| download | zcatch-dc3feaf42cd8bcb22b04fdba17dc10caacc94fef.tar.gz zcatch-dc3feaf42cd8bcb22b04fdba17dc10caacc94fef.zip | |
Fixed remaining compiler warnings for gcc on Linux
Diffstat (limited to 'src/game')
| -rw-r--r-- | src/game/client/components/maplayers.cpp | 2 | ||||
| -rw-r--r-- | src/game/client/components/menus_demo.cpp | 2 | ||||
| -rw-r--r-- | src/game/server/entities/character.cpp | 16 |
3 files changed, 16 insertions, 4 deletions
diff --git a/src/game/client/components/maplayers.cpp b/src/game/client/components/maplayers.cpp index 202ea2da..62b32a1f 100644 --- a/src/game/client/components/maplayers.cpp +++ b/src/game/client/components/maplayers.cpp @@ -42,7 +42,7 @@ void CMapLayers::EnvelopeEval(float TimeOffset, int Env, float *pChannels, void pChannels[2] = 0; pChannels[3] = 0; - CEnvPoint *pPoints; + CEnvPoint *pPoints = 0; { int Start, Num; diff --git a/src/game/client/components/menus_demo.cpp b/src/game/client/components/menus_demo.cpp index fd0caf62..784212ca 100644 --- a/src/game/client/components/menus_demo.cpp +++ b/src/game/client/components/menus_demo.cpp @@ -475,7 +475,7 @@ void CMenus::RenderDemoList(CUIRect MainView) str_copy(aTitleButton, "Open", sizeof(aTitleButton)); else str_copy(aTitleButton, "Play", sizeof(aTitleButton)); - // /!\ TODO: Add "Open" in Localization /!\ + //TODO: Add "Open" in Localization if(DoButton_Menu(&s_PlayButton, Localize(aTitleButton), 0, &PlayRect) || Activated) { if(s_SelectedItem >= 0 && s_SelectedItem < m_lDemos.size()) 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; |