//************************************************************************** //** //** ## ## ## ## ## #### #### ### ### //** ## ## ## ## ## ## ## ## ## ## #### #### //** ## ## ## ## ## ## ## ## ## ## ## ## ## ## //** ## ## ######## ## ## ## ## ## ## ## ### ## //** ### ## ## ### ## ## ## ## ## ## //** # ## ## # #### #### ## ## //** //** $Id: Thinker.vc 2437 2007-07-11 17:20:20Z dj_jl $ //** //** Copyright (C) 1999-2006 Jānis Legzdiņš //** //** This program is free software; you can redistribute it and/or //** modify it under the terms of the GNU General Public License //** as published by the Free Software Foundation; either version 2 //** of the License, or (at your option) any later version. //** //** This program is distributed in the hope that it will be useful, //** but WITHOUT ANY WARRANTY; without even the implied warranty of //** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //** GNU General Public License for more details. //** //************************************************************************** class Thinker : Object native abstract; enum { ROLE_None, ROLE_DumbProxy, ROLE_Authority }; readonly Level XLevel; // Level object. readonly LevelInfo Level; // Level info object. native readonly private Thinker Prev; native readonly private Thinker Next; byte Role; byte RemoteRole; bool bAlwaysRelevant; // Always updated readonly bool bNetInitial; // Initial update readonly bool bNetOwner; // Is owned by current player. replication { reliable if (Role == ROLE_Authority) Role, RemoteRole; } native final spawner Thinker Spawn(class Type, optional TVec AOrigin, optional TAVec AAngles, optional mthing_t* mthing); native void Destroy(); // Broadcast message (print to all clients) native final void bprint(string format, ...); native final dlight_t *AllocDlight(Thinker Owner); native final particle_t *NewParticle(); native final iterator AllThinkers(class Class, out Thinker Thinker); native final iterator AllActivePlayers(out BasePlayer Player); native final iterator PathTraverse(out intercept_t* In, float x1, float y1, float x2, float y2, int flags); native final iterator RadiusThings(out Entity Ent, TVec Org, float Radius); //========================================================================== // // Tick // //========================================================================== void Tick(float deltaTime) { } //========================================================================== // // ClientTick // //========================================================================== void ClientTick(float DeltaTime) { } //========================================================================== // // GET_SPAC // //========================================================================== final int GET_SPAC(int Flags) { return (Flags & ML_SPAC_MASK) >> ML_SPAC_SHIFT; } defaultproperties { Role = ROLE_Authority; RemoteRole = ROLE_DumbProxy; }