From 479d81bb384cc1bf93f42ffcafd746cffcf1839a Mon Sep 17 00:00:00 2001 From: driAn Date: Sun, 4 May 2008 10:06:22 +0000 Subject: [PATCH] ctf flag dropping on mapmodels git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1857 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/clients2c.cpp | 2 +- source/src/entities.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/src/clients2c.cpp b/source/src/clients2c.cpp index a335c83e..f6ba4f86 100644 --- a/source/src/clients2c.cpp +++ b/source/src/clients2c.cpp @@ -512,7 +512,7 @@ void parsemessages(int cn, playerent *d, ucharbuf &p) { short x = (ushort) (getint(p)/DMF); short y = (ushort) (getint(p)/DMF); - short z = (ushort) (getint(p)/DMF); + short z = ((ushort) (getint(p)/DMF))-((short)player1->eyeheight); // correct z offset, assumes all players do have same eyeheight flagdropped(flag, action, x, y, z); break; } diff --git a/source/src/entities.cpp b/source/src/entities.cpp index 89fe488e..8d9793df 100644 --- a/source/src/entities.cpp +++ b/source/src/entities.cpp @@ -324,7 +324,7 @@ void flagdropped(int flag, int action, short x, short y, short z) p.rotspeed = 0.0f; p.o.x = x; p.o.y = y; - p.o.z = floor(x, y); + p.o.z = z; p.vel.z = -1.0f; loopi(50) moveplayer(&p, 50, true); // calc drop position f.flag->x = (short)p.o.x;