flag dropping on heighfields, fixed menu hotkeys

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1641 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2008-02-11 15:16:49 +00:00
parent ce678675f4
commit 968bbcca96
2 changed files with 18 additions and 6 deletions
+11 -4
View File
@@ -310,10 +310,17 @@ void flagstolen(int flag, int action, int act)
void flagdropped(int flag, int action, short x, short y, short z)
{
flaginfo &f = flaginfos[flag];
if(OUTBORD(x, y)) return;
f.flag->x = x;
f.flag->y = y;
f.flag->z = (short)floor(x, y);
if(OUTBORD(x, y)) return; // valid pos
bounceent p;
p.rotspeed = 0.0f;
p.o.x = x;
p.o.y = y;
p.o.z = (short)floor(x, y);
p.vel.z = -1.0f;
loopi(50) moveplayer(&p, 50, true);
f.flag->x = p.o.x;
f.flag->y = p.o.y;
f.flag->z = p.o.z;
if(f.flag->z < hdr.waterlevel) f.flag->z = (short) hdr.waterlevel;
f.flag->spawned = true;
f.ack = true;