forked from OpenXRay/xray-16
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathActorMountedWeapon.cpp
40 lines (38 loc) · 1.22 KB
/
ActorMountedWeapon.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include "StdAfx.h"
#pragma hdrstop
#include "Actor.h"
#include "xrEngine/CameraBase.h"
#include "ActorEffector.h"
#include "CharacterPhysicsSupport.h"
bool CActor::use_MountedWeapon(CHolderCustom* object)
{
/*
CHolderCustom* wpn =object;
if(m_holder){
if(!wpn||(m_holder==wpn)){
m_holder->detach_Actor();
character_physics_support()->movement()->CreateCharacter();
m_holder=NULL;
}
return true;
}else{
if(wpn){
Fvector center; Center(center);
if(wpn->Use(Device.vCameraPosition, Device.vCameraDirection,center)){
if(wpn->attach_Actor(this)){
// destroy actor character
character_physics_support()->movement()->DestroyCharacter();
PickupModeOff();
m_holder=wpn;
if (pCamBobbing){
Cameras().RemoveCamEffector(eCEBobbing);
pCamBobbing = NULL;
}
return true;
}
}
}
}
*/
return false;
}