mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Use INBOUNDS() check for mapclass::warpto()
There's a lot of places where the INBOUNDS() check is spelled out instead of using the macro, before the macro was introduced. Also the macro should probably be renamed INBOUNDS_VEC() to be consistent.
This commit is contained in:
@@ -889,7 +889,7 @@ void mapclass::warpto(int rx, int ry , int t, int tx, int ty)
|
||||
{
|
||||
gotoroom(rx, ry);
|
||||
game.teleport = false;
|
||||
if (t >= 0 && t < (int) obj.entities.size())
|
||||
if (INBOUNDS(t, obj.entities))
|
||||
{
|
||||
obj.entities[t].xp = tx * 8;
|
||||
obj.entities[t].yp = (ty * 8) - obj.entities[t].h;
|
||||
|
||||
Reference in New Issue
Block a user