@ -23,6 +23,14 @@
class EPawn extends EPlaceable
abstract;
/**
* If caller pawn is controlled by a player, this method returns that player.
*
* @return Player that controls caller pawn. `none` iff caller pawn is not
* controlled by a player.
*/
public function EPlayer GetPlayer();
* Returns current amount of health caller `EPawn`'s referred entity has,
* assuming that entity has a health component.
@ -117,6 +117,19 @@ public function Vector GetLocation()
return Vect(0.0, 0.0, 0.0);
}
public function EPlayer GetPlayer()
{
local Pawn pawnInstance;
pawnInstance = GetNativeInstance();
if (pawnInstance != none)
return _.players.FromController(
PlayerController(pawnInstance.controller));
return none;
public function int GetHealth()