Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/world_entities/npcs/npc_test1.cc @ 8724

Last change on this file since 8724 was 8724, checked in by bensch, 18 years ago

merged the bsp-model-stuff back here

File size: 1.0 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_test1.h"
[5033]21#include "obb_tree.h"
[1853]22
[4984]23#include "state.h"
[5451]24#include "power_ups/turret_power_up.h"
[5458]25#include "power_ups/laser_power_up.h"
[4984]26
[1858]27using namespace std;
[1853]28
[1858]29
[5682]30NPCTest1::NPCTest1()
[8724]31  : NPC(NULL)
[1931]32{
[6004]33  this->setClassID(CL_NPC_TEST1, "NPCTest1");
[4976]34
[5621]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);
[5059]39
[6004]40  this->randomRotAxis =  VECTOR_RAND(1).getNormalized();
[1931]41}
[1853]42
[5034]43
[5682]44NPCTest1::~NPCTest1 () {}
[1853]45
46
[5451]47
[5682]48void NPCTest1::tick(float dt)
[4984]49{
[5060]50  this->shiftDir(Quaternion(dt, this->randomRotAxis));
[4984]51}
52
53
[5033]54
Note: See TracBrowser for help on using the repository browser.