Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 29, 2006, 12:19:48 AM (18 years ago)
Author:
patrick
Message:

merged the branche single_player_map with the trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/creatures/fps_player.cc

    r8846 r8894  
    2626#include "weapons/turret.h"
    2727#include "weapons/cannon.h"
     28#include "weapons/fps_sniper_rifle.h"
    2829
    2930#include "key_mapper.h"
     
    3536
    3637CREATE_FACTORY(FPSPlayer, CL_FPS_PLAYER);
     38
     39#include "script_class.h"
     40CREATE_SCRIPTABLE_CLASS(FPSPlayer, CL_FPS_PLAYER,
     41                        addMethod("setAbsCoor", ExecutorLua3<PNode,float,float,float>(&PNode::setAbsCoor))
     42                            ->addMethod("getAbsCoorX", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorX))
     43                            ->addMethod("getAbsCoorY", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorY))
     44                            ->addMethod("getAbsCoorZ", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorZ))
     45                       );
    3746
    3847
     
    101110  dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( false);
    102111
    103   Weapon* wpRight = new TestGun(0);
     112  Weapon* wpRight = new FPSSniperRifle(0);
    104113  wpRight->setName("testGun Right");
    105   Weapon* wpLeft = new TestGun(1);
     114/*  Weapon* wpLeft = new TestGun(1);*/
    106115//   Weapon* wpLeft = new Turret();
    107   wpLeft->setName("testGun Left");
    108 
    109   this->addWeapon(wpLeft, 1, 0);
    110   this->addWeapon(wpRight,1 ,1);
     116//   wpLeft->setName("testGun Left");
     117
     118//   this->addWeapon(wpLeft, 1, 0);
     119  this->addWeapon(wpRight,1, 0);
    111120  this->getWeaponManager().changeWeaponConfig(1);
    112121
    113122  this->getWeaponManager().setSlotCount(2);
    114   this->getWeaponManager().setSlotPosition(0, Vector(-0.5, .2, -1.9));
     123  this->getWeaponManager().setSlotPosition(0, Vector(0.0, 5.0, 0.0));
     124  this->getWeaponManager().setSlotDirection(1, Quaternion(M_PI_4*.5, Vector(0,1,0)));
    115125  this->getWeaponManager().setSlotCapability(0, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
    116126  this->getWeaponManager().setSlotPosition(1, Vector(-0.5, .2, 1.9));
Note: See TracChangeset for help on using the changeset viewer.