flag drop height fix (no longer uses eye pos)

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3011 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2008-10-14 18:33:26 +00:00
parent 6acb262b50
commit 2ad7aa7111
3 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -561,9 +561,9 @@ void parsemessages(int cn, playerent *d, ucharbuf &p)
break;
case CTFF_DROPPED:
{
short x = (ushort) (getint(p)/DMF);
short y = (ushort) (getint(p)/DMF);
short z = ((ushort) (getint(p)/DMF))-((short)player1->eyeheight); // correct z offset, assumes all players do have the same eyeheight
short x = getuint(p)/DMF;
short y = getuint(p)/DMF;
short z = getuint(p)/DMF;
flagdropped(flag, x, y, z);
break;
}
+1 -1
View File
@@ -342,7 +342,7 @@ void flagdropped(int flag, short x, short y, short z)
p.rotspeed = 0.0f;
p.o.x = x;
p.o.y = y;
p.o.z = z + 5;
p.o.z = z;
p.vel.z = -0.8f;
p.aboveeye = p.eyeheight = p.maxeyeheight = 0.4f;
p.radius = 0.1f;
+1 -1
View File
@@ -860,7 +860,7 @@ void putflaginfo(ucharbuf &p, int flag)
putint(p, f.actor_cn);
break;
case CTFF_DROPPED:
loopi(3) putint(p, int(f.pos[i]*DMF));
loopi(3) putuint(p, uint(f.pos[i]*DMF));
break;
}
}