Last change
on this file since 10619 was
8724,
checked in by bensch, 19 years ago
|
merged the bsp-model-stuff back here
|
File size:
1.0 KB
|
Line | |
---|
1 | |
---|
2 | |
---|
3 | /* |
---|
4 | orxonox - the future of 3D-vertical-scrollers |
---|
5 | |
---|
6 | Copyright (C) 2004 orx |
---|
7 | |
---|
8 | This program is free software; you can redistribute it and/or modify |
---|
9 | it under the terms of the GNU General Public License as published by |
---|
10 | the Free Software Foundation; either version 2, or (at your option) |
---|
11 | any later version. |
---|
12 | |
---|
13 | ### File Specific: |
---|
14 | main-programmer: Patrick Boenzli |
---|
15 | co-programmer: |
---|
16 | */ |
---|
17 | #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY |
---|
18 | |
---|
19 | |
---|
20 | #include "npc_test1.h" |
---|
21 | #include "obb_tree.h" |
---|
22 | |
---|
23 | #include "state.h" |
---|
24 | #include "power_ups/turret_power_up.h" |
---|
25 | #include "power_ups/laser_power_up.h" |
---|
26 | |
---|
27 | using namespace std; |
---|
28 | |
---|
29 | |
---|
30 | NPCTest1::NPCTest1() |
---|
31 | : NPC(NULL) |
---|
32 | { |
---|
33 | this->setClassID(CL_NPC_TEST1, "NPCTest1"); |
---|
34 | |
---|
35 | if ((float)rand()/RAND_MAX > .5f) |
---|
36 | this->loadModel("models/ships/bolido.obj", 2); |
---|
37 | else |
---|
38 | this->loadModel("models/ships/gobblin.obj", 2); |
---|
39 | |
---|
40 | this->randomRotAxis = VECTOR_RAND(1).getNormalized(); |
---|
41 | } |
---|
42 | |
---|
43 | |
---|
44 | NPCTest1::~NPCTest1 () {} |
---|
45 | |
---|
46 | |
---|
47 | |
---|
48 | void NPCTest1::tick(float dt) |
---|
49 | { |
---|
50 | this->shiftDir(Quaternion(dt, this->randomRotAxis)); |
---|
51 | } |
---|
52 | |
---|
53 | |
---|
54 | |
---|
Note: See
TracBrowser
for help on using the repository browser.