Add height check for Chancebox usage.
This commit is contained in:
parent
2b28154f20
commit
ca7046311c
2 changed files with 5 additions and 1 deletions
|
|
@ -1,2 +1,2 @@
|
|||
[default]
|
||||
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r627 \cu(Fri 20 Nov 13:43:03 CET 2020)";
|
||||
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r628 \cu(Fri 20 Nov 14:08:00 CET 2020)";
|
||||
|
|
|
|||
|
|
@ -846,6 +846,10 @@ Class Chancebox : Actor
|
|||
}
|
||||
override bool Used( Actor user )
|
||||
{
|
||||
// test vertical range
|
||||
Vector3 diff = level.Vec3Diff(user.Vec3Offset(0,0,user.Height/2),Vec3Offset(0,0,Height/2));
|
||||
double rang = user.player?PlayerPawn(user.player.mo).UseRange:(user.Height/2);
|
||||
if ( abs(diff.z) > rang ) return false;
|
||||
if ( CurState != FindState("Spawn") ) return false;
|
||||
if ( !dud )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue