Skip to main content

CBasePlayerPawn

Base player pawn entity. Provides access to the owning controller.

public class CBasePlayerPawn : CBaseEntity

Namespace: DeadworksManaged.Api
Inherits / implements: CBaseEntity
Derived types: CCitadelPlayerPawn
Source: Entities/CBasePlayerPawn.cs#L5

Properties​

CBasePlayerPawn.Controller​

Signature

public CBasePlayerController? Controller { get; }

Source: Entities/CBasePlayerPawn.cs#L9

CBasePlayerPawn.ObserverServices​

The observer/spectator state component on this pawn, or null if not allocated.

Signature

public CPlayer_ObserverServices? ObserverServices { get; }

Source: Entities/CBasePlayerPawn.cs#L20

CBasePlayerPawn.ObserverMode​

Current observer mode, or ObserverMode_t.None if no services are attached.

Signature

public ObserverMode_t ObserverMode { get; }

Source: Entities/CBasePlayerPawn.cs#L28

CBasePlayerPawn.ObserverTarget​

Currently observed entity, or null if no target / no services.

Signature

public CBaseEntity? ObserverTarget { get; }

Source: Entities/CBasePlayerPawn.cs#L31

Methods​

CBasePlayerPawn.SetObserverMode()​

Signature

public void SetObserverMode(ObserverMode_t mode)

Source: Entities/CBasePlayerPawn.cs#L34

CBasePlayerPawn.SetObserverTarget()​

Signature

public bool SetObserverTarget(CBaseEntity? target)

Source: Entities/CBasePlayerPawn.cs#L37

CBasePlayerPawn.IsValidObserverTarget()​

Signature

public bool IsValidObserverTarget(CBaseEntity? target)

Source: Entities/CBasePlayerPawn.cs#L40

CBasePlayerPawn.ForceRespawn()​

Respawns this pawn immediately, the same way the respawn cheat command does. It behaves like a normal respawn, including firing the player_respawned event.

Signature

public void ForceRespawn(bool releaseButtons = true)

Parameters

  • releaseButtons: Release any buttons the player is holding, so they don't keep moving or shooting after the respawn.

Source: Entities/CBasePlayerPawn.cs#L48