2022-07-23 15:38:20 +00:00
|
|
|
scn EBxOnCrosshairTracker
|
|
|
|
|
|
|
|
ref rSource
|
|
|
|
|
|
|
|
begin function {}
|
|
|
|
|
|
|
|
if MenuMode == 0
|
|
|
|
|
2022-07-24 14:13:55 +00:00
|
|
|
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
|
|
|
|
|
2022-07-23 15:38:20 +00:00
|
|
|
if GetCrosshairWater
|
|
|
|
return
|
|
|
|
endif
|
|
|
|
|
|
|
|
if eval rSource := GetCrosshairRef
|
2022-07-24 14:13:55 +00:00
|
|
|
if rSource.GetType == 21 ; activator
|
2022-07-23 15:38:20 +00:00
|
|
|
if rSource.GetActivatorWaterType
|
|
|
|
return
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
SetGameMainLoopCallback EBxOnCrosshairTracker 0
|
|
|
|
|
2022-07-24 14:13:55 +00:00
|
|
|
SetOnControlDownEventHandler EBxOnControlDown 0 5
|
2022-07-23 15:38:20 +00:00
|
|
|
SetOnControlUpEventHandler EBxOnControlUp 0 5
|
|
|
|
EnableControl 5
|
|
|
|
|
|
|
|
end
|