AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Module Coding (https://forums.alliedmods.net/forumdisplay.php?f=9)
-   -   Module: BMOD - Extended Physics Module (https://forums.alliedmods.net/showthread.php?t=178066)

Backup 01-03-2013 02:09

Re: Module: BMOD - Extended Physics Module
 
But in that way players would have a delay in controls, wouldn't they?

ILZM 01-03-2013 03:30

Re: Module: BMOD - Extended Physics Module
 
This code works:shock:, lol
For detecting of roll
Code:

public bmod_forward_contact(pEnt1, pEnt2, Float:flDist)
{
        static Float:vVel[3], Float:vOldVel[3];
       
        if (bmod_object_check(pEnt1))
        {
                bmod_object_get_vector(pEnt1, BMOD_VEC_velocity, vVel);
               
                entity_get_vector(pEnt1, EV_VEC_movedir, vOldVel);
               
                if (vector_length(vVel)> 75 && get_distance_f(vVel, vOldVel)> 100.0)
                {                               
                        //SOUNDS...
                }
               
                entity_set_vector(pEnt1, EV_VEC_movedir, vVel);
        }
        else
        if (bmod_object_check(pEnt2))
        {
                bmod_object_get_vector(pEnt2, BMOD_VEC_velocity, vVel);
               
                entity_get_vector(pEnt2, EV_VEC_movedir, vOldVel);
               
                if (vector_length(vVel)> 75 && get_distance_f(vVel, vOldVel)> 100.0)
                {                               
                        //SOUNDS...
                }
               
                entity_set_vector(pEnt2, EV_VEC_movedir, vVel);
        }
}

Is it possible to make physic ents static? Due to them physic ents can collide with phys_breakable an etc.
And is it possible to keep colliding, but allow game to move ent? Because you also can set for this ent MOVETYPE_FOLLOW and it will follow player and always stay with him(BMOD can't move this ent)

joropito 01-03-2013 08:51

Re: Module: BMOD - Extended Physics Module
 
Quote:

Originally Posted by Backup (Post 1865967)
But in that way players would have a delay in controls, wouldn't they?

Like a prediction with lag but only perceptible WITH LAG.
You can also do that at ServerFrame instead of PreThink. Not sure if it will help.


Adding planes to studio models (in memory) will be better, but you can't do that client side...

ILZM 01-05-2013 09:27

Re: Module: BMOD - Extended Physics Module
 
Hello1 again:)
I decided to use your bmod thoroughly, so i have an question:
Does bmod block touch at all? Because ExecuteHam(Ham_Touch, pEnt, id) doesnt work...

Backup 01-05-2013 10:33

Re: Module: BMOD - Extended Physics Module
 
nope
What did you expect to happen after executing that touch?

ILZM 01-05-2013 11:15

Re: Module: BMOD - Extended Physics Module
 
To touch player with weaponbox which is in bmod world)).

ILZM 01-05-2013 13:07

Re: Module: BMOD - Extended Physics Module
 
1.Why bmod_object_set_vector(pEnt, BMOD_VEC_velocity, vVel) conflicts with entity_set_vector(pEnt, EV_VEC_velocity, vVel)? Because sometimes when i use only bmod_object_set_vector(pEnt, BMOD_VEC_velocity, vVel) bmod ent losts BMOD_box and becomes BMOD_sphere and has 2 origins, where only one has a model o.O.(weird post:mrgreen:)
2. Is it possible to make field for solid like SOLID_NOT and etc?

Backup 01-05-2013 13:43

Re: Module: BMOD - Extended Physics Module
 
1, dafuq? Are you sure it's bmod internal problem? Btw setting entity's velocity and stuff is pointless, bmod doesn't care and overwritets it with calculated value by bullet engine.
2, nope, not in current version.

ILZM 01-07-2013 03:04

Re: Module: BMOD - Extended Physics Module
 
I found why ExecuteHam(Ham_Touch, pEnt, id) aren't executed because of this:
Code:

void CWeaponBox::Touch( CBaseEntity *pOther )
{
        if ( !(pev->flags & FL_ONGROUND ) )
        {
                return;
        }
       
        ....
}

So, entity_set_int(pEnt, EV_INT_flags, entity_get_int(Ent, EV_INT_flags) | FL_ONGROUND) fixes it:)

ILZM 05-16-2013 09:48

Re: Module: BMOD - Extended Physics Module
 
Hello.
What about new version? I still wait:wink:
Some questions:
1. What is the bug, when a bmod entity in equilibrium state changes angle by 90 by itself?? You already saw that in your vids.
2. Any support for brush entities?
3. Will you add player collision? I think bullet physics already have implementation.
Please, please make it, i hope for you!


All times are GMT -4. The time now is 06:00.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.