You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
872 B

scn EBxOnCrosshairTracker
ref rSource
begin function {}
if MenuMode == 0
if eval EBxFillBottleDelay > 0 && IsControlDisabled 5 && IsKeyPressed (GetControl 5) 2
if playerRef.AuxiliaryVariableGetFloat "*timer" < EBxFillBottleDelay
playerRef.AuxiliaryVariableSetFloat "*timer" (playerRef.AuxiliaryVariableGetFloat "*timer" + GetSecondsPassed)
else
MessageEx "activating source"
call EBxActivateWaterSource
return
endif
endif
if GetCrosshairWater
return
endif
if eval rSource := GetCrosshairRef
if rSource.GetType == 21 ; activator
if rSource.GetActivatorWaterType
return
endif
endif
endif
endif
SetGameMainLoopCallback EBxOnCrosshairTracker 0
SetOnControlDownEventHandler EBxOnControlDown 0 5
SetOnControlUpEventHandler EBxOnControlUp 0 5
EnableControl 5
end