mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-25 17:20:47 +02:00
extra sanity check (was needed in my mod)
This commit is contained in:
@@ -348,9 +348,11 @@ int Element_STKM::run_stickman(playerst *playerp, UPDATE_FUNC_ARGS) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Charge detector wall if foot inside
|
//Charge detector wall if foot inside
|
||||||
if (sim->bmap[(int)(playerp->legs[5]+0.5)/CELL][(int)(playerp->legs[4]+0.5)/CELL]==WL_DETECT)
|
if (INBOND((int)(playerp->legs[4]+0.5)/CELL, (int)(playerp->legs[5]+0.5)/CELL) &&
|
||||||
|
sim->bmap[(int)(playerp->legs[5]+0.5)/CELL][(int)(playerp->legs[4]+0.5)/CELL]==WL_DETECT)
|
||||||
sim->set_emap((int)playerp->legs[4]/CELL, (int)playerp->legs[5]/CELL);
|
sim->set_emap((int)playerp->legs[4]/CELL, (int)playerp->legs[5]/CELL);
|
||||||
if (sim->bmap[(int)(playerp->legs[13]+0.5)/CELL][(int)(playerp->legs[12]+0.5)/CELL]==WL_DETECT)
|
if (INBOND((int)(playerp->legs[12]+0.5)/CELL, (int)(playerp->legs[13]+0.5)/CELL) &&
|
||||||
|
sim->bmap[(int)(playerp->legs[13]+0.5)/CELL][(int)(playerp->legs[12]+0.5)/CELL]==WL_DETECT)
|
||||||
sim->set_emap((int)(playerp->legs[12]+0.5)/CELL, (int)(playerp->legs[13]+0.5)/CELL);
|
sim->set_emap((int)(playerp->legs[12]+0.5)/CELL, (int)(playerp->legs[13]+0.5)/CELL);
|
||||||
|
|
||||||
//Searching for particles near head
|
//Searching for particles near head
|
||||||
|
Reference in New Issue
Block a user