📄 m_boss3.pas
字号:
{----------------------------------------------------------------------------}
{ }
{ File(s): m_boss3.h }
{ }
{ Initial conversion by : Ben Watt (ben@delphigamedev.com) }
{ Initial conversion on : 29-Jan-2002 }
{ }
{ This File contains part of convertion of Quake2 source to ObjectPascal. }
{ More information about this project can be found at: }
{ http://www.sulaco.co.za/quake2/ }
{ }
{ 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. }
{ }
{----------------------------------------------------------------------------}
{ Updated on : }
{ Updated by : }
{ }
{----------------------------------------------------------------------------}
{ * Still dependent (to compile correctly) on: }
{ 1.) g_local.h and game.h }
{----------------------------------------------------------------------------}
{ * TODO: }
{ 1.) test compilation with the above two units }
{----------------------------------------------------------------------------}
{
==============================================================================
boss3
==============================================================================
}
unit m_boss3;
interface
const MODEL_SCALE = 1.000000;
{$I g_local.inc}
{$I m_boss32.inc}
procedure Use_Boss3(ent, other, activator : edict_t);
procedure Think_Boss3Stand(ent : edict_t);
procedure SP_monster_boss3_stand(self : edict_t);
procedure Use_Boss3(ent, other, activator : edict_t);
begin
gi.WriteByte(svc_temp_entity);
gi.WriteByte(TE_BOSSTPORT);
gi.WritePosition(ent.s.origin);
gi.multicast(ent.s.origin, MULTICAST_PVS);
G_FreeEdict(ent);
end;
procedure Think_Boss3Stand(ent : edict_t);
begin
if ent.s.frame = FRAME_stand260 then
ent.s.frame := FRAME_stand201
else
begin
ent.s.frame := ent.s.frame + 1;
ent.nextthink := level.time + FRAMETIME;
end;
end;
{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.}
procedure SP_monster_boss3_stand(self : edict_t);
begin
if (deathmatch.value) then
begin
G_FreeEdict(self);
exit;
end;
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);
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -