Langerd Posted October 28, 2017 Posted October 28, 2017 As i looked in the game limbs are disapearing after 15 seconds. Cant find anywhere a time to remove those from the game.
fau Posted November 4, 2017 Posted November 4, 2017 This part in g_combat.c:G_Dismember() G_SetOrigin( limb, newPoint ); VectorCopy( newPoint, limb->s.pos.trBase ); limb->think = LimbThink; limb->touch = LimbTouch; limb->speed = level.time + Q_irand(8000, 16000); limb->nextthink = level.time + FRAMETIME; limb->speed is time when a limb will disappear.
Langerd Posted November 11, 2017 Author Posted November 11, 2017 This part in g_combat.c:G_Dismember() G_SetOrigin( limb, newPoint ); VectorCopy( newPoint, limb->s.pos.trBase ); limb->think = LimbThink; limb->touch = LimbTouch; limb->speed = level.time + Q_irand(8000, 16000); limb->nextthink = level.time + FRAMETIME; limb->speed is time when a limb will disappear.That is for MP only.. I am looking for SP code.
Noodle Posted November 11, 2017 Posted November 11, 2017 I think it's cvar related. See in cvarlist if there's anything that rings a bell
Langerd Posted November 14, 2017 Author Posted November 14, 2017 I think it's cvar related. See in cvarlist if there's anything that rings a bellThat is not the case here. There is only bodies removal time. I found the code lines that when limb is in solid it is removed. BUT if the limb is rotating or moving - it wont be removed from the game. Maybe some of You saw that limb of the enemy that was cut off - if it will fall on the mountain or the edge - it will slowly go down and limb will roatate. I found out that if this happens - the limbs stay in the game forever until they stop moving. I just want in my map to walk with the bodies laying around and body parts to make everything so much more brutal.
Noodle Posted November 14, 2017 Posted November 14, 2017 I just want in my map to walk with the bodies laying around and body parts to make everything so much more brutal. Wouldn't in that scenario be preferable to create a .md3 file with the body parts scattered around to be used as a misc_model entity? If you edit the code, think how much resources it will take to keep rendered all the body parts all the time.
Langerd Posted November 14, 2017 Author Posted November 14, 2017 Wouldn't in that scenario be preferable to create a .md3 file with the body parts scattered around to be used as a misc_model entity? If you edit the code, think how much resources it will take to keep rendered all the body parts all the time. I dont want to make them stay forever but much much longer. I know that i can make MD3 bodies with flesh and body parts all over the place.
fau Posted December 13, 2017 Posted December 13, 2017 Try increasing values of Q_irand(), or replace them with constants in milliseconds in g_combat.c:LimbThink() if ( level.time > ent->s.apos.trTime + ent->s.apos.trDuration ) { if (ent->owner && ent->owner->m_pVehicle) { ent->nextthink = level.time + Q_irand( 10000, 15000 ); } else { ent->nextthink = level.time + Q_irand( 5000, 15000 ); } ent->e_ThinkFunc = thinkF_G_FreeEntity; //FIXME: these keep drawing for a frame or so after being freed?! See them lerp to origin of world... }
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now