diff --git a/source/src/entities.cpp b/source/src/entities.cpp index e0676632..7c12e8ad 100644 --- a/source/src/entities.cpp +++ b/source/src/entities.cpp @@ -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; diff --git a/source/src/menus.cpp b/source/src/menus.cpp index 42b2d522..054f05fb 100644 --- a/source/src/menus.cpp +++ b/source/src/menus.cpp @@ -572,8 +572,13 @@ bool menukey(int code, bool isdown, int unicode) case SDLK_9: if(curmenu->allowinput && curmenu->hotkeys) { - mitem &m = *curmenu->items[code-SDLK_1]; - m.select(); + int idx = code-SDLK_1; + if(curmenu->items.inrange(idx)) + { + menuselect(curmenu, idx); + mitem &m = *curmenu->items[idx]; + m.select(); + } return true; } default: