-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Humans enhancement #46
Conversation
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.
Thanks, see comments.
src/humanio.c
Outdated
(MAX((int)value[0], 0) < SAR_ASSISTING_HUMANS_MAX) | ||
? MAX((int)value[0], 0) : SAR_ASSISTING_HUMANS_MAX |
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.
There is a CLIP
function for this, if I'm understanding right. CLIP((int)value[0], 0, SAR_ASSISTING_HUMANS)
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.
You're right, done!
src/humanio.c
Outdated
else if(!strcasecmp(buf, "Gender")) | ||
{ | ||
/* Male is default gender. | ||
* If Female, a breast will be drawn on torso. |
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.
Hopefully two breasts?
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.
Yes, hopefully ! French <-> English translation issue... Done !
src/simop.c
Outdated
{ | ||
/* Was rope previously in? */ | ||
if(hoist->rope_cur < hoist->contact_z_max) | ||
if (door_ptr->flags & SAR_OBJ_PART_FLAG_DOOR_OPENED) | ||
{ | ||
/* Hoist deployment was in so now it needs to | ||
* be put out and its values initialized | ||
*/ | ||
sar_position_struct *hoist_pos = &hoist->pos, | ||
/* Was rope previously in? */ | ||
if(hoist->rope_cur < hoist->contact_z_max) | ||
{ | ||
/* Hoist deployment was in so now it needs to | ||
* be put out and its values initialized | ||
*/ | ||
sar_position_struct *hoist_pos = &hoist->pos, | ||
*hoist_offset = &hoist->offset; | ||
double tx = hoist_offset->x, | ||
double tx = hoist_offset->x, | ||
ty = hoist_offset->y, | ||
tz = hoist_offset->z; | ||
|
||
/* Move to initial position at hoist center */ | ||
SFMOrthoRotate2D( | ||
obj_ptr->dir.heading, &tx, &ty | ||
); | ||
hoist_pos->x = (float)( | ||
obj_ptr->pos.x + tx | ||
); | ||
hoist_pos->y = (float)( | ||
obj_ptr->pos.y + ty | ||
); | ||
hoist_pos->z = (float)( | ||
obj_ptr->pos.z + tz - | ||
hoist->rope_cur | ||
); | ||
/* Move to initial position at hoist center */ | ||
SFMOrthoRotate2D( | ||
obj_ptr->dir.heading, &tx, &ty | ||
); | ||
hoist_pos->x = (float)( | ||
obj_ptr->pos.x + tx | ||
); | ||
hoist_pos->y = (float)( | ||
obj_ptr->pos.y + ty | ||
); | ||
hoist_pos->z = (float)( | ||
obj_ptr->pos.z + tz - | ||
hoist->rope_cur | ||
); | ||
|
||
/* Reset hoist values */ | ||
hoist->rope_cur = hoist->contact_z_max; | ||
hoist->rope_cur_vis = hoist->rope_cur; | ||
hoist->on_ground = 0; | ||
} | ||
else | ||
{ | ||
/* Lower rope normally */ | ||
hoist->rope_cur += (rope_rate * | ||
time_compensation * time_compression * | ||
hoist_down_coeff); | ||
if(hoist->rope_cur > hoist->rope_max) | ||
hoist->rope_cur = hoist->rope_max; | ||
|
||
/* Do not update rope_cur_vis, it will be updated | ||
* in the other simulation calls | ||
*/ | ||
} | ||
/* Reset hoist values */ | ||
hoist->rope_cur = hoist->contact_z_max; | ||
hoist->rope_cur_vis = hoist->rope_cur; | ||
hoist->on_ground = 0; |
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.
Is something changing here or just indentation issue?
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.
Only indentation, no changes here.
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.
can we leave the original? It looks like the second IF is indented too little.
tools/v3dconverter/readme.txt
Outdated
@@ -0,0 +1,40 @@ | |||
|
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.
Can we put this on a separate PR? Seems out the "human improvement" scope
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.
Lost in git, ONE MORE TIME...
I don't understand why it is in humans enhancement PR, I pushed this 2 days ago in the v3dconverter branch, but I didn't asked any PR for this branch because even if v3dconverter works (I did all Corsica scenery update new models with it), as written in readme.txt/FOREWORD: it's not yet finished !
How can I remove these files ? With .../Delete file ???
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.
It seems you pushed onto this branch too.
First check that the v3dconverter stuff is correctly committed in the other branch.
Then you can do git rebase -i master
on this branch and select which commits to drop. I can do it for you too.
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.
If you can do it, I think that it will be less dangerous for the SarII project... This morning I read some documentation about rebase, but frankly speaking, it is not clear for me.
Perhaps we could put this as part of the test_world scenery? There's not much space (only a boat and a burning platform, but maybe a good excuse to add some land. Yes, I will do it. |
src/simop.c
Outdated
{ | ||
/* Was rope previously in? */ | ||
if(hoist->rope_cur < hoist->contact_z_max) | ||
if (door_ptr->flags & SAR_OBJ_PART_FLAG_DOOR_OPENED) | ||
{ | ||
/* Hoist deployment was in so now it needs to | ||
* be put out and its values initialized | ||
*/ | ||
sar_position_struct *hoist_pos = &hoist->pos, | ||
/* Was rope previously in? */ | ||
if(hoist->rope_cur < hoist->contact_z_max) | ||
{ | ||
/* Hoist deployment was in so now it needs to | ||
* be put out and its values initialized | ||
*/ | ||
sar_position_struct *hoist_pos = &hoist->pos, | ||
*hoist_offset = &hoist->offset; | ||
double tx = hoist_offset->x, | ||
double tx = hoist_offset->x, | ||
ty = hoist_offset->y, | ||
tz = hoist_offset->z; | ||
|
||
/* Move to initial position at hoist center */ | ||
SFMOrthoRotate2D( | ||
obj_ptr->dir.heading, &tx, &ty | ||
); | ||
hoist_pos->x = (float)( | ||
obj_ptr->pos.x + tx | ||
); | ||
hoist_pos->y = (float)( | ||
obj_ptr->pos.y + ty | ||
); | ||
hoist_pos->z = (float)( | ||
obj_ptr->pos.z + tz - | ||
hoist->rope_cur | ||
); | ||
/* Move to initial position at hoist center */ | ||
SFMOrthoRotate2D( | ||
obj_ptr->dir.heading, &tx, &ty | ||
); | ||
hoist_pos->x = (float)( | ||
obj_ptr->pos.x + tx | ||
); | ||
hoist_pos->y = (float)( | ||
obj_ptr->pos.y + ty | ||
); | ||
hoist_pos->z = (float)( | ||
obj_ptr->pos.z + tz - | ||
hoist->rope_cur | ||
); | ||
|
||
/* Reset hoist values */ | ||
hoist->rope_cur = hoist->contact_z_max; | ||
hoist->rope_cur_vis = hoist->rope_cur; | ||
hoist->on_ground = 0; | ||
} | ||
else | ||
{ | ||
/* Lower rope normally */ | ||
hoist->rope_cur += (rope_rate * | ||
time_compensation * time_compression * | ||
hoist_down_coeff); | ||
if(hoist->rope_cur > hoist->rope_max) | ||
hoist->rope_cur = hoist->rope_max; | ||
|
||
/* Do not update rope_cur_vis, it will be updated | ||
* in the other simulation calls | ||
*/ | ||
} | ||
/* Reset hoist values */ | ||
hoist->rope_cur = hoist->contact_z_max; | ||
hoist->rope_cur_vis = hoist->rope_cur; | ||
hoist->on_ground = 0; |
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.
can we leave the original? It looks like the second IF is indented too little.
- Add a 'Gender' parameter in /data/humans.ini - Body shape now depends of weight and gender (very basic Body Mass Index use) - Up to 4 assistants instead of 1 per victim - Victim and assistant(s) can now be any of defined human, and not only blue/red and green guys - Documentation updated
0427286
to
2b6812d
Compare
Hereunder a mission file to see what is now possible:
humans_test.mis.txt