forked from Mirrors/openclonk
Physical: Push and Pull acceleration is now an Action property
parent
fea3b20269
commit
b63940742e
|
@ -36,5 +36,4 @@ Breath=50000
|
||||||
Jump=35000
|
Jump=35000
|
||||||
Dig=40000
|
Dig=40000
|
||||||
Throw=50000
|
Throw=50000
|
||||||
Push=40000
|
|
||||||
CanDig=1
|
CanDig=1
|
||||||
|
|
|
@ -32,7 +32,6 @@ Breath=100000
|
||||||
Jump=40000
|
Jump=40000
|
||||||
Dig=40000
|
Dig=40000
|
||||||
Throw=50000
|
Throw=50000
|
||||||
Push=40000
|
|
||||||
CanDig=1
|
CanDig=1
|
||||||
CanConstruct=1
|
CanConstruct=1
|
||||||
CanChop=1
|
CanChop=1
|
||||||
|
|
|
@ -2020,6 +2020,7 @@ Push = {
|
||||||
Name = "Push",
|
Name = "Push",
|
||||||
Procedure = DFA_PUSH,
|
Procedure = DFA_PUSH,
|
||||||
Speed = 196,
|
Speed = 196,
|
||||||
|
Accel = 100,
|
||||||
Directions = 2,
|
Directions = 2,
|
||||||
Length = 8,
|
Length = 8,
|
||||||
Delay = 15,
|
Delay = 15,
|
||||||
|
|
|
@ -173,7 +173,6 @@ struct C4PhysInfoNameMap_t { const char *szName; C4PhysicalInfo::Offset off; } C
|
||||||
{ "Jump", &C4PhysicalInfo::Jump },
|
{ "Jump", &C4PhysicalInfo::Jump },
|
||||||
{ "Dig", &C4PhysicalInfo::Dig },
|
{ "Dig", &C4PhysicalInfo::Dig },
|
||||||
{ "Throw", &C4PhysicalInfo::Throw },
|
{ "Throw", &C4PhysicalInfo::Throw },
|
||||||
{ "Push", &C4PhysicalInfo::Push },
|
|
||||||
{ "Magic", &C4PhysicalInfo::Magic },
|
{ "Magic", &C4PhysicalInfo::Magic },
|
||||||
{ "Float", &C4PhysicalInfo::Float },
|
{ "Float", &C4PhysicalInfo::Float },
|
||||||
{ "CanScale", &C4PhysicalInfo::CanScale },
|
{ "CanScale", &C4PhysicalInfo::CanScale },
|
||||||
|
|
|
@ -43,7 +43,6 @@ public:
|
||||||
int32_t Jump;
|
int32_t Jump;
|
||||||
int32_t Dig;
|
int32_t Dig;
|
||||||
int32_t Throw;
|
int32_t Throw;
|
||||||
int32_t Push;
|
|
||||||
int32_t Magic;
|
int32_t Magic;
|
||||||
int32_t CanScale;
|
int32_t CanScale;
|
||||||
int32_t CanHangle;
|
int32_t CanHangle;
|
||||||
|
|
|
@ -4257,7 +4257,7 @@ void C4Object::ExecAction()
|
||||||
case COMD_Stop: case COMD_Down: iTXDir=0; break;
|
case COMD_Stop: case COMD_Down: iTXDir=0; break;
|
||||||
}
|
}
|
||||||
// Push object
|
// Push object
|
||||||
if (!Action.Target->Push(iTXDir,ValByPhysical(250, pPhysical->Push),fStraighten))
|
if (!Action.Target->Push(iTXDir,accel,fStraighten))
|
||||||
{ StopActionDelayCommand(this); return; }
|
{ StopActionDelayCommand(this); return; }
|
||||||
// Set target controller
|
// Set target controller
|
||||||
Action.Target->Controller=Controller;
|
Action.Target->Controller=Controller;
|
||||||
|
@ -4325,7 +4325,7 @@ void C4Object::ExecAction()
|
||||||
iTXDir = fMove + fWalk * BoundBy<int32_t>(iPullX-Action.Target->GetX(),-10,+10) / 10;
|
iTXDir = fMove + fWalk * BoundBy<int32_t>(iPullX-Action.Target->GetX(),-10,+10) / 10;
|
||||||
|
|
||||||
// Push object
|
// Push object
|
||||||
if (!Action.Target->Push(iTXDir,ValByPhysical(250, pPhysical->Push),false))
|
if (!Action.Target->Push(iTXDir,accel,false))
|
||||||
{ StopActionDelayCommand(this); return; }
|
{ StopActionDelayCommand(this); return; }
|
||||||
// Set target controller
|
// Set target controller
|
||||||
Action.Target->Controller=Controller;
|
Action.Target->Controller=Controller;
|
||||||
|
|
Loading…
Reference in New Issue