-
-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
phantom_set_enemy is_on_belt item_on_belt belt_count get_actor_max_weight set_actor_max_weight get_actor_max_walk_weight set_actor_max_walk_weight get_additional_max_weight set_additional_max_weight get_additional_max_walk_weight set_additional_max_walk_weight get_total_weight weight get_actor_jump_speed set_actor_jump_speed get_actor_sprint_koef set_actor_sprint_koef get_actor_run_coef set_actor_run_coef get_actor_runback_coef set_actor_runback_coef + ray_pick class export * console command snd_cache_size upper limit increased to 64
- Loading branch information
1 parent
eba6916
commit 9b6a6db
Showing
22 changed files
with
703 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#include "stdafx.h" | ||
#include "raypick.h" | ||
#include "level.h" | ||
|
||
CRayPick::CRayPick() | ||
{ | ||
start_position.set(0, 0, 0); | ||
direction.set(0, 0, 0); | ||
range = 0; | ||
flags = collide::rq_target::rqtNone; | ||
ignore = nullptr; | ||
}; | ||
|
||
CRayPick::CRayPick(const Fvector& P, const Fvector& D, const float R, const collide::rq_target F, CScriptGameObject* I) | ||
{ | ||
start_position.set(P); | ||
direction.set(D); | ||
range = R; | ||
flags = F; | ||
ignore = nullptr; | ||
if (I) | ||
ignore = smart_cast<IGameObject*>(&(I->object())); | ||
}; | ||
|
||
bool CRayPick::query() | ||
{ | ||
collide::rq_result R; | ||
if (Level().ObjectSpace.RayPick(start_position, direction, range, flags, R, ignore)) | ||
{ | ||
result.set(R); | ||
return true; | ||
} | ||
|
||
return false; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#pragma once | ||
|
||
#include "script_game_object.h" | ||
#include "xrCDB/xr_collide_defs.h" | ||
|
||
struct script_rq_result | ||
{ | ||
CScriptGameObject* O; | ||
float range; | ||
int element; | ||
|
||
script_rq_result() | ||
{ | ||
O = nullptr; | ||
range = 0; | ||
element = 0; | ||
}; | ||
|
||
void set(collide::rq_result& R) | ||
{ | ||
if (R.O) | ||
{ | ||
IGameObject* go = smart_cast<IGameObject*>(R.O); | ||
if (go) | ||
O = go->lua_game_object(); | ||
} | ||
range = R.range; | ||
element = R.element; | ||
}; | ||
}; | ||
|
||
// class for performing ray pick | ||
struct CRayPick | ||
{ | ||
Fvector start_position; | ||
Fvector direction; | ||
float range; | ||
collide::rq_target flags; | ||
script_rq_result result; | ||
IGameObject* ignore; | ||
|
||
CRayPick(); | ||
CRayPick(const Fvector& P, const Fvector& D, const float R, const collide::rq_target F, CScriptGameObject* I); | ||
|
||
void set_position(Fvector& P) { start_position = P; }; | ||
void set_direction(Fvector& D) { direction = D; }; | ||
void set_range(float R) { range = R; }; | ||
void set_flags(collide::rq_target F) { flags = F; }; | ||
void set_ignore_object(CScriptGameObject* I) | ||
{ | ||
if (I) ignore = smart_cast<IGameObject*>(&(I->object())); | ||
} | ||
|
||
bool query(); | ||
|
||
script_rq_result get_result() { return result; }; | ||
CScriptGameObject* get_object() { return result.O; }; | ||
float get_distance() { return result.range; }; | ||
int get_element() { return result.element; }; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.