-void ObserverThink(entity this)
-{
- if ( CS(this).impulse )
- {
- MinigameImpulse(this, CS(this).impulse);
- CS(this).impulse = 0;
- }
-
- if (this.flags & FL_JUMPRELEASED) {
- if (PHYS_INPUT_BUTTON_JUMP(this) && joinAllowed(this)) {
- this.flags &= ~FL_JUMPRELEASED;
- this.flags |= FL_SPAWNING;
- } else if(PHYS_INPUT_BUTTON_ATCK(this) && !CS(this).version_mismatch || this.would_spectate) {
- this.flags &= ~FL_JUMPRELEASED;
- if(SpectateNext(this)) {
- TRANSMUTE(Spectator, this);
- }
- } else {
- int preferred_movetype = ((!PHYS_INPUT_BUTTON_USE(this) ? CS(this).cvar_cl_clippedspectating : !CS(this).cvar_cl_clippedspectating) ? MOVETYPE_FLY_WORLDONLY : MOVETYPE_NOCLIP);
- set_movetype(this, preferred_movetype);
- }
- } else {
- if (!(PHYS_INPUT_BUTTON_ATCK(this) || PHYS_INPUT_BUTTON_JUMP(this))) {
- this.flags |= FL_JUMPRELEASED;
- if(this.flags & FL_SPAWNING)
- {
- this.flags &= ~FL_SPAWNING;
- Join(this);
- return;
- }
- }
- }
-}
-
-void SpectatorThink(entity this)