mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-11-17 16:39:42 +01: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:
parent
fdb01adc68
commit
ff8d616438
1 changed files with 1 additions and 1 deletions
|
@ -889,7 +889,7 @@ void mapclass::warpto(int rx, int ry , int t, int tx, int ty)
|
||||||
{
|
{
|
||||||
gotoroom(rx, ry);
|
gotoroom(rx, ry);
|
||||||
game.teleport = false;
|
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].xp = tx * 8;
|
||||||
obj.entities[t].yp = (ty * 8) - obj.entities[t].h;
|
obj.entities[t].yp = (ty * 8) - obj.entities[t].h;
|
||||||
|
|
Loading…
Reference in a new issue