GM/FindUseEntity

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
(Validated and added version locked of the official link from source2013, I honestly doubt +use would change at all between versions)
Line 1: Line 1:
 
{{Hook
 
{{Hook
|Description=This hook polls the entity the player use action should be applied to. The default behavior of this hook is on line 971 of [https://github.com/HL2-Ghosting-Team/src/blob/master/game/shared/baseplayer_shared.cpp].
+
|Description=This hook polls the entity the player use action should be applied to. The default behavior of this hook is on [https://github.com/ValveSoftware/source-sdk-2013/blob/0d8dceea4310fde5706b3ce1c70609d72a38efdf/mp/src/game/shared/baseplayer_shared.cpp#L1068-L1270 CBasePlayer::FindUseEntity()].
{{Validate|Since this isn't a link to official source code from Facepunch or Valve someone should confirm that this is the default behaviour.}}
+
 
|Realm=Shared
 
|Realm=Shared
 
|Predicted=No
 
|Predicted=No

Revision as of 22:45, 16 March 2017

 GM:FindUseEntity( )

Contents

Description

This hook polls the entity the player use action should be applied to. The default behavior of this hook is on CBasePlayer::FindUseEntity().

Arguments

Player ply

The player who initiated the use action.

Arguments

Entity defaultEnt

The entity that was chosen by the engine.

Returns

Entity

The entity to use instead of default entity
Personal tools
Navigation