Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Medical Blood - Settings improvements and cleanup #7069

Merged
merged 4 commits into from
Jun 27, 2019

Conversation

mharis001
Copy link
Member

When merged this pull request will:

  • Make the enabledFor setting able to be changed mid-mission
  • Add settings for medical blood (max objects, lifetime) similar to litter
  • General cleanup of the component

@mharis001 mharis001 added kind/cleanup Release Notes: **CHANGED:** kind/enhancement Release Notes: **IMPROVED:** labels Jun 22, 2019
@mharis001 mharis001 changed the base branch from master to medical-settings-cleanup June 22, 2019 21:12
@PabstMirror PabstMirror added this to the Medical Rewrite milestone Jun 23, 2019
_object setPos _pos;
private _bloodDrop = createSimpleObject [_model, [0, 0, 0]];
_bloodDrop setDir random 360;
_bloodDrop setPos _position;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need a seperate setPos? It creates a additonal network message as blooddrops are global.
Speaking of which, couldn't we make blooddrops local only with the new createSimpleObject local syntax?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we want them to be global, but agree about whether setPos is necessary

Copy link
Contributor

@PabstMirror PabstMirror Jun 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surprising results (unless I made a mistake)
edit: we knew that createVehicle at [0,0,0] is faster because it normally scans for a "free" position, but I didn't think it did that for createSimpleObject (objects are in a row clipping though things)

createVehicle @ [0,0,0] - 492 ms

private _start = diag_tickTime; 
for "_i" from 0 to 30000 step 3 do { 
    private _pos = (getPos player) vectorAdd [0,_i,0]; 
    private _z = "Land_LampStreet_small_F" createVehicle [0,0,0]; 
    _z setPos _pos; 
}; 
private _end = diag_tickTime; 
x3 = _end - _start;

createVehicle @ pos - 4798 ms (and non-precise placement)

private _start = diag_tickTime; 
for "_i" from 0 to 30000 step 3 do { 
    private _pos = (getPos player) vectorAdd [0,_i,0]; 
    private _z = "Land_LampStreet_small_F" createVehicle _pos; 
}; 
private _end = diag_tickTime; 
x3 = _end - _start;

createSimpleObject @ [0,0,0] - 263 ms

private _start = diag_tickTime; 
for "_i" from 0 to 30000 step 3 do { 
    private _pos = AGLtoASL ((getPos player) vectorAdd [0,_i,0]); 
    private _z = createSimpleObject ["Land_LampStreet_small_F", [0,0,0]]; 
    _z setPosASL _pos;
}; 
private _end = diag_tickTime; 
x3 = _end - _start;

createSimpleObject @ pos - 2641 ms

private _start = diag_tickTime; 
for "_i" from 0 to 30000 step 3 do { 
    private _pos = AGLtoASL ((getPos player) vectorAdd [0,_i,0]); 
    private _z = createSimpleObject ["Land_LampStreet_small_F", _pos]; 
}; 
private _end = diag_tickTime; 
x3 = _end - _start;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

network traffic vs sqf speed
(unless the game can serialize the create and setPos together?)
we can continue to think about this after merge

@alganthe alganthe mentioned this pull request Jun 27, 2019
28 tasks
@PabstMirror PabstMirror merged commit 09f44c6 into medical-settings-cleanup Jun 27, 2019
@PabstMirror PabstMirror deleted the medical-blood-settings branch June 27, 2019 18:28
PabstMirror pushed a commit that referenced this pull request Jun 28, 2019
* Cleanup medical settings

* Fix extra [

* Allow giving IV/blood to self by default

* Medical Blood - Settings improvements and cleanup (#7069)

* Add more blood settings and cleanup

* Fix include before header

* Update addons/medical_blood/functions/fnc_init.sqf

Co-Authored-By: PabstMirror <[email protected]>

* Disable debug

* Cleanup moved settings

* Fix remaining setting descriptions
@PabstMirror PabstMirror modified the milestones: Medical Rewrite, 3.13.0, 3.13.0-temp2 Dec 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cleanup Release Notes: **CHANGED:** kind/enhancement Release Notes: **IMPROVED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants