- if(!_Movetype_TestEntityPosition(this, '0 0 0')) return true;
- if(!_Movetype_TestEntityPosition(this, '-1 0 0')) goto success;
- if(!_Movetype_TestEntityPosition(this, '1 0 0')) goto success;
- if(!_Movetype_TestEntityPosition(this, '0 -1 0')) goto success;
- if(!_Movetype_TestEntityPosition(this, '0 1 0')) goto success;
- if(!_Movetype_TestEntityPosition(this, '-1 -1 0')) goto success;
- if(!_Movetype_TestEntityPosition(this, '1 -1 0')) goto success;
- if(!_Movetype_TestEntityPosition(this, '-1 1 0')) goto success;
- if(!_Movetype_TestEntityPosition(this, '1 1 0')) goto success;
- for (int i = 1; i <= 17; ++i)
+ entity oldself = this;
+ setself(this);
+ if (!_Movetype_TestEntityPosition(/* this, */ ' 0 0 0')) {
+ setself(oldself);
+ return true;
+ }
+ #define X(v) if (_Movetype_TestEntityPosition(/* this, */ v))
+ X('-1 0 0') X(' 1 0 0')
+ X(' 0 -1 0') X(' 0 1 0')
+ X('-1 -1 0') X(' 1 -1 0')
+ X('-1 1 0') X(' 1 1 0')
+ #undef X