Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/ai/src/world_entities/npcs/npc_test.cc @ 10263

Last change on this file since 10263 was 10263, checked in by patrick, 17 years ago

ai is now handeled in npc, weapon manager added

File size: 1.2 KB
RevLine 
[1853]1
2
[4597]3/*
[1853]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.
[1855]12
13   ### File Specific:
14   main-programmer: Patrick Boenzli
15   co-programmer:
[1853]16*/
[5357]17#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
[1853]18
19
[5682]20#include "npc_test.h"
[10135]21#include <stdio.h>
[1853]22
[4984]23#include "state.h"
[5511]24#include "debug.h"
[4984]25
[9235]26#include "loading/factory.h"
27#include "loading/load_param.h"
[5511]28
[9947]29#include "md2/md2Model.h"
30#include "player.h"
31#include "playable.h"
[1853]32
[9869]33#include "class_id_DEPRECATED.h"
[10041]34
[10263]35
[9869]36ObjectListDefinitionID(NPC2, CL_NPC_TEST2);
37CREATE_FACTORY(NPC2);
[1858]38
[9947]39
[10263]40NPC2::NPC2(const TiXmlElement* root)
[1931]41{
[10263]42  this->registerObject(this, NPC2::_objectList);
[10135]43
[10263]44  if (root != NULL)
45    this->loadParams(root);
[10135]46
[10263]47
48  // create the weapons and their manager
49
[10138]50}
[10135]51
[10138]52NPC2::~NPC2()
53{
[1931]54}
[1853]55
[9235]56void NPC2::loadParams(const TiXmlElement* root)
57{
58  NPC::loadParams(root);
[10135]59
[9235]60}
61
62
[9947]63
64void NPC2::tick(float dt)
[9235]65{
[10263]66
67
68
69
70  // animating the md2 model
71  if( likely(this->getModel(0) != NULL) && this->getModel(0)->isA(MD2Model::staticClassID()))
72    ((MD2Model*)this->getModel(0))->tick(dt);
[4984]73}
74
75
[5033]76
Note: See TracBrowser for help on using the repository browser.