Rocket boots for fighters.
This commit is contained in:
parent
c6930ddc5f
commit
f35f221554
@ -90,26 +90,36 @@ int Element_FIGH::update(UPDATE_FUNC_ARGS)
|
|||||||
}
|
}
|
||||||
else if (tarx<x)
|
else if (tarx<x)
|
||||||
{
|
{
|
||||||
if(!(sim->eval_move(PT_FIGH, figh->legs[4]-10, figh->legs[5]+6, NULL)
|
if(figh->rocketBoots || !(sim->eval_move(PT_FIGH, figh->legs[4]-10, figh->legs[5]+6, NULL)
|
||||||
&& sim->eval_move(PT_FIGH, figh->legs[4]-10, figh->legs[5]+3, NULL)))
|
&& sim->eval_move(PT_FIGH, figh->legs[4]-10, figh->legs[5]+3, NULL)))
|
||||||
figh->comm = 0x01;
|
figh->comm = 0x01;
|
||||||
else
|
else
|
||||||
figh->comm = 0x02;
|
figh->comm = 0x02;
|
||||||
|
|
||||||
if (!sim->eval_move(PT_FIGH, figh->legs[4]-4, figh->legs[5]-1, NULL)
|
if (figh->rocketBoots)
|
||||||
|
{
|
||||||
|
if (tary<y)
|
||||||
|
figh->comm = (int)figh->comm | 0x04;
|
||||||
|
}
|
||||||
|
else if (!sim->eval_move(PT_FIGH, figh->legs[4]-4, figh->legs[5]-1, NULL)
|
||||||
|| !sim->eval_move(PT_FIGH, figh->legs[12]-4, figh->legs[13]-1, NULL)
|
|| !sim->eval_move(PT_FIGH, figh->legs[12]-4, figh->legs[13]-1, NULL)
|
||||||
|| sim->eval_move(PT_FIGH, 2*figh->legs[4]-figh->legs[6], figh->legs[5]+5, NULL))
|
|| sim->eval_move(PT_FIGH, 2*figh->legs[4]-figh->legs[6], figh->legs[5]+5, NULL))
|
||||||
figh->comm = (int)figh->comm | 0x04;
|
figh->comm = (int)figh->comm | 0x04;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!(sim->eval_move(PT_FIGH, figh->legs[12]+10, figh->legs[13]+6, NULL)
|
if (figh->rocketBoots || !(sim->eval_move(PT_FIGH, figh->legs[12]+10, figh->legs[13]+6, NULL)
|
||||||
&& sim->eval_move(PT_FIGH, figh->legs[12]+10, figh->legs[13]+3, NULL)))
|
&& sim->eval_move(PT_FIGH, figh->legs[12]+10, figh->legs[13]+3, NULL)))
|
||||||
figh->comm = 0x02;
|
figh->comm = 0x02;
|
||||||
else
|
else
|
||||||
figh->comm = 0x01;
|
figh->comm = 0x01;
|
||||||
|
|
||||||
if (!sim->eval_move(PT_FIGH, figh->legs[4]+4, figh->legs[5]-1, NULL)
|
if (figh->rocketBoots)
|
||||||
|
{
|
||||||
|
if (tary<y)
|
||||||
|
figh->comm = (int)figh->comm | 0x04;
|
||||||
|
}
|
||||||
|
else if (!sim->eval_move(PT_FIGH, figh->legs[4]+4, figh->legs[5]-1, NULL)
|
||||||
|| !sim->eval_move(PT_FIGH, figh->legs[4]+4, figh->legs[5]-1, NULL)
|
|| !sim->eval_move(PT_FIGH, figh->legs[4]+4, figh->legs[5]-1, NULL)
|
||||||
|| sim->eval_move(PT_FIGH, 2*figh->legs[12]-figh->legs[14], figh->legs[13]+5, NULL))
|
|| sim->eval_move(PT_FIGH, 2*figh->legs[12]-figh->legs[14], figh->legs[13]+5, NULL))
|
||||||
figh->comm = (int)figh->comm | 0x04;
|
figh->comm = (int)figh->comm | 0x04;
|
||||||
|
@ -395,7 +395,7 @@ int Element_STKM::run_stickman(playerst* playerp, UPDATE_FUNC_ARGS) {
|
|||||||
playerp->elem = SPC_AIR;
|
playerp->elem = SPC_AIR;
|
||||||
else if (sim->bmap[(ry+y)/CELL][(rx+x)/CELL]==WL_EHOLE)
|
else if (sim->bmap[(ry+y)/CELL][(rx+x)/CELL]==WL_EHOLE)
|
||||||
playerp->rocketBoots = false;
|
playerp->rocketBoots = false;
|
||||||
else if (sim->bmap[(ry+y)/CELL][(rx+x)/CELL]==WL_GRAV && parts[i].type!=PT_FIGH)
|
else if (sim->bmap[(ry+y)/CELL][(rx+x)/CELL]==WL_GRAV /* && parts[i].type!=PT_FIGH */)
|
||||||
playerp->rocketBoots = true;
|
playerp->rocketBoots = true;
|
||||||
if ((r&0xFF)==PT_PRTI)
|
if ((r&0xFF)==PT_PRTI)
|
||||||
Element_STKM::STKM_interact(sim, playerp, i, rx, ry);
|
Element_STKM::STKM_interact(sim, playerp, i, rx, ry);
|
||||||
|
Loading…
Reference in New Issue
Block a user