aboutsummaryrefslogtreecommitdiffstats
path: root/src/jake2/game/M_Boss3.java
blob: ca41173e2267344609010fd4a45c838e08446c10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/*
Copyright (C) 1997-2001 Id Software, Inc.

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.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

*/

// Created on 13.11.2003 by RST.
// $Id: M_Boss3.java,v 1.1 2004-07-07 19:59:09 hzi Exp $

package jake2.game;

public class M_Boss3 extends M_Boss32 {

	static EntUseAdapter Use_Boss3 = new EntUseAdapter() {
		public void use(edict_t ent, edict_t other, edict_t activator) {
			gi.WriteByte(svc_temp_entity);
			gi.WriteByte(TE_BOSSTPORT);
			gi.WritePosition(ent.s.origin);
			gi.multicast(ent.s.origin, MULTICAST_PVS);
			G_FreeEdict(ent);
		}
	};

	static EntThinkAdapter Think_Boss3Stand = new EntThinkAdapter() {
		public boolean think(edict_t ent) {
			if (ent.s.frame == FRAME_stand260)
				ent.s.frame = FRAME_stand201;
			else
				ent.s.frame++;
			ent.nextthink = level.time + FRAMETIME;
			return true;
		}

	};

	/*QUAKED monster_boss3_stand (1 .5 0) (-32 -32 0) (32 32 90)
	
	Just stands and cycles in one place until targeted, then teleports away.
	*/
	static void SP_monster_boss3_stand(edict_t self) {
		if (deathmatch.value != 0) {
			G_FreeEdict(self);
			return;
		}

		self.movetype = MOVETYPE_STEP;
		self.solid = SOLID_BBOX;
		self.model = "models/monsters/boss3/rider/tris.md2";
		self.s.modelindex = gi.modelindex(self.model);
		self.s.frame = FRAME_stand201;

		gi.soundindex("misc/bigtele.wav");

		VectorSet(self.mins, -32, -32, 0);
		VectorSet(self.maxs, 32, 32, 90);

		self.use = Use_Boss3;
		self.think = Think_Boss3Stand;
		self.nextthink = level.time + FRAMETIME;
		gi.linkentity(self);
	}
}