Last change
on this file since 10041 was
10041,
checked in by tfahrni, 17 years ago
|
Tried to make some progress with the AI..
|
File size:
1.1 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 | #include "movement_module.h" |
---|
20 | |
---|
21 | MovementModule::MovementModule(){ |
---|
22 | } |
---|
23 | |
---|
24 | MovementModule::~MovementModule(){ |
---|
25 | } |
---|
26 | |
---|
27 | |
---|
28 | void MovementModule::process() |
---|
29 | { |
---|
30 | |
---|
31 | //How does the Module know the AITeamMember it belongs to?? |
---|
32 | |
---|
33 | /*Vector absPosition = this->getAbsCoor(); |
---|
34 | |
---|
35 | PRINTF(0)(" npc abs coor: %f, %f, %f\n", absPosition.x, absPosition.y, absPosition.z); |
---|
36 | |
---|
37 | Player* pl = State::getPlayer(); |
---|
38 | Vector playerAbsPos = pl->getPlayable()->getAbsCoor(); |
---|
39 | |
---|
40 | PRINTF(0)(" player abs coor: %f, %f, %f\n", playerAbsPos.x, playerAbsPos.y, playerAbsPos.z); |
---|
41 | |
---|
42 | |
---|
43 | // intelligent reaction |
---|
44 | |
---|
45 | Vector distanceVector = playerAbsPos - absPosition; |
---|
46 | distanceVector.normalize(); |
---|
47 | |
---|
48 | float speed = 10.0f; |
---|
49 | |
---|
50 | this->shiftCoor( distanceVector * speed * dt);*/ |
---|
51 | } |
---|
52 | |
---|
53 | |
---|
Note: See
TracBrowser
for help on using the repository browser.