This repository has been archived by the owner on Sep 13, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
bacrodai.cpp
76 lines (61 loc) · 1.77 KB
/
bacrodai.cpp
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
//-----------------------------------------------------------------------------
//
// $Logfile:: /Quake 2 Engine/Sin/code/game/bacrodai.cpp $
// $Revision:: 3 $
// $Author:: Markd $
// $Date:: 10/22/98 7:57p $
//
// Copyright (C) 1998 by Ritual Entertainment, Inc.
// All rights reserved.
//
// This source is may not be distributed and/or modified without
// expressly written permission by Ritual Entertainment, Inc.
//
// $Log:: /Quake 2 Engine/Sin/code/game/bacrodai.cpp $
//
// 3 10/22/98 7:57p Markd
// put in proper pre-caching in all the classes
//
// 2 10/20/98 3:25a Markd
// first time
//
// 1 10/20/98 3:10a Markd
//
// DESCRIPTION:
// Bacrodai
//
#include "g_local.h"
#include "actor.h"
#include "bacrodai.h"
CLASS_DECLARATION( Actor, Bacrodai, "monster_bachrodai" );
Event EV_Bacrodai_SpawnBat( "spawnbat" );
ResponseDef Bacrodai::Responses[] =
{
{ &EV_Bacrodai_SpawnBat, ( Response )Bacrodai::SpawnBat },
{ NULL, NULL }
};
Bacrodai::Bacrodai()
{
setModel( "bacrodai.def" );
modelIndex( "bat.def" );
}
void Bacrodai::SpawnBat
(
Event *ev
)
{
Actor * ent;
str text;
Vector pos;
if ( !currentEnemy )
return;
pos = centroid - ( Vector( orientation[ 0 ] ) * 48 );
// create a new entity
G_InitSpawnArguments();
G_SetSpawnArg( "model", "bat.def" );
text = va( "%f %f %f", pos[ 0 ], pos[ 1 ], pos[ 2 ] );
G_SetSpawnArg( "origin", text.c_str() );
ent = new Actor;
G_InitSpawnArguments();
ent->MakeEnemy( currentEnemy, true );
}