-
Notifications
You must be signed in to change notification settings - Fork 739
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
Conversation
Co-Authored-By: PabstMirror <[email protected]>
_object setPos _pos; | ||
private _bloodDrop = createSimpleObject [_model, [0, 0, 0]]; | ||
_bloodDrop setDir random 360; | ||
_bloodDrop setPos _position; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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;
There was a problem hiding this comment.
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
* 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
When merged this pull request will:
enabledFor
setting able to be changed mid-mission