yes, i am sorry
IPhysicsObject *VPhysicsInitNormal( SolidType_t solidType, int
nSolidFlags, bool createAsleep, solid_t *pSolid = NULL );
found it.

Although, the only fix i can think of is disablimg slams completely. I
am open to other suggestions, but please realize i am not the best at
this...



On Mon, Oct 11, 2010 at 9:26 PM, Olly Ginger <oli...@gmail.com> wrote:
> When checking function signatures, look at the header, not the cpp
>
> Sent from my iPhone
>
> On 12 Oct 2010, at 03:10, Nick <xnicho...@gmail.com> wrote:
>
>> So i guess the solution is to disable tripmines compleletely?
>>
>> I just did some more digging (gdb is still active on crashed process).
>> It seems that in grenade_ tripmine, (and evwhere else)
>> VPhysicsInitNormal is called with 3 arguments. But in
>> baseentity_shared.cpp (only place coded) VPhysicsInitNormal has 4
>> arguments? I am more confused. I guess somewhere VPhysicsInitNormal is
>> overided, but it is hard to debug?
>>
>>
>>
>>
>> (gdb) print GetSolidFlags()
>> $5 = 8
>> (gdb) print m_pPhysicsObject
>> $6 = (IPhysicsObject *) 0x0
>>
>> (gdb) print VPhysicsInitNormal( SOLID_BBOX, GetSolidFlags() |
>> FSOLID_TRIGGER, true )
>> too few arguments in function call
>>
>>
>> src\game\shared\baseentity_shared.cpp == stock valve code (4 arguments)
>> IPhysicsObject *CBaseEntity::VPhysicsInitNormal( SolidType_t
>> solidType, int nSolidFlags, bool createAsleep, solid_t *pSolid )
>> {
>>
>> src\game\server\hl2mp\grenade_tripmine.cpp:: line 77 ( 3 arguments )
>> IPhysicsObject *pObject = VPhysicsInitNormal( SOLID_BBOX,
>> GetSolidFlags() | FSOLID_TRIGGER, true );
>>
>>
>>
>> On Mon, Oct 11, 2010 at 8:17 PM, Tony Paloma <drunkenf...@hotmail.com> wrote:
>>> VPhysicsInitNormal is not guaranteed to return non-null. It can fail for a
>>> variety of reasons. Take a look at CBaseEntity::VPhysicsInitNormal in
>>> baseentity_shared.cpp to see.
>>>
>>> -----Original Message-----
>>> From: hlcoders-boun...@list.valvesoftware.com
>>> [mailto:hlcoders-boun...@list.valvesoftware.com] On Behalf Of Nick
>>> Sent: Monday, October 11, 2010 6:00 PM
>>> To: Discussion of Half-Life Programming
>>> Subject: [hlcoders] void CTripmineGrenade::Spawn( void ) linux crash
>>> orangebox stock code.......
>>>
>>> gcc (GCC) 4.2.4
>>>
>>> Linux dual-core 2.6.28-19-generic #65-Ubuntu SMP Thu Sep 16 14:14:28 UTC
>>> 2010 i686 GNU/Linux
>>>
>>> n...@dual-core:~/srcds/orangebox/orangebox$ ./srcds_i486 --version
>>> Warning: falling back to auto detection of vproject directory.
>>> Unable to find gameinfo.txt. Solutions:
>>>
>>> 1. Read http://www.valve-erc.com/srcsdk/faq.html#NoGameDir
>>>
>>>
>>>
>>>
>>>
>>> ldd server_i486.so
>>>        linux-gate.so.1 =>  (0xb7784000)
>>>        libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb6457000)
>>>        libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb6453000)
>>>        tier0_i486.so => not found
>>>        vstdlib_i486.so => not found
>>>        steam_api_i486.so => not found
>>>        libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb62ef000)
>>>        /lib/ld-linux.so.2 (0xb7785000)
>>>
>>>
>>>
>>>
>>> 69      void CTripmineGrenade::Spawn( void )
>>> 70      {
>>> 71              Precache( );
>>> 72              // motor
>>> (gdb) l
>>> 73              SetMoveType( MOVETYPE_FLY );
>>> 74              SetSolid( SOLID_BBOX );
>>> 75              SetModel( "models/Weapons/w_slam.mdl" );
>>> 76
>>> 77          IPhysicsObject *pObject = VPhysicsInitNormal( SOLID_BBOX,
>>> GetSolidFlags() | FSOLID_TRIGGER, true );
>>> 78              pObject->EnableMotion( false );
>>> 79              SetCollisionGroup( COLLISION_GROUP_WEAPON );
>>> 80
>>> 81              SetCycle( 0.0f );
>>> 82              m_nBody                 = 3;
>>>
>>>
>>>
>>> (gdb) bt
>>> #0  0xb520b112 in CTripmineGrenade::Spawn (this=0xbdf5bf0) at
>>> ../game/server/hl2mp/grenade_tripmine.cpp:78
>>> #1  0xb4ef5d39 in DispatchSpawn (pEntity=0xbdf5bf0) at
>>> ../game/server/util.cpp:1880
>>> #2  0xb4d0d348 in CBaseEntity::Create (szName=0xb53ba629 "npc_tripmine",
>>> vecorig...@0xbfbedfac, vecangl...@0xbfbedf54,
>>> pOwner=0x0)
>>>    at ../game/server/baseentity.cpp:2976
>>> #3  0xb5064b4e in CWeapon_SLAM::TripmineAttach (this=0xbdf28d8) at
>>> ../game/server/../shared/hl2mp/weapon_slam.cpp:381
>>> #4  0xb5064d70 in CWeapon_SLAM::WeaponIdle (this=0xbdf28d8) at
>>> ../game/server/../shared/hl2mp/weapon_slam.cpp:875
>>> #5  0xb5063c16 in CWeapon_SLAM::ItemPostFrame (this=0xbdf28d8) at
>>> ../game/server/../shared/hl2mp/weapon_slam.cpp:789
>>> #6  0xb4fa108d in CBasePlayer::ItemPostFrame (this=0xbdd0810) at
>>> ../game/server/../shared/baseplayer_shared.cpp:229
>>> #7  0xb50af8f1 in CHL2_Player::ItemPostFrame (this=0xbdd0810) at
>>> ../game/server/hl2/hl2_player.cpp:3588
>>> #8  0xb4e5b3a9 in CBasePlayer::PostThink (this=0xbdd0810) at
>>> ../game/server/player.cpp:4436
>>> #9  0xb50b4643 in CHL2_Player::PostThink (this=0xbdd0810) at
>>> ../game/server/hl2/hl2_player.cpp:891
>>> #10 0xb5205732 in CHL2MP_Player::PostThink (this=0xbdd0810) at
>>> ../game/server/hl2mp/hl2mp_player.cpp:998
>>> #11 0xb4e68a5e in CPlayerMove::RunPostThink (this=0xb56a56b8,
>>> player=0xbdd0810) at ../game/server/player_command.cpp:302
>>> #12 0xb4e69a6c in CPlayerMove::RunCommand (this=0xb56a56b8,
>>> player=0xbdd0810, ucmd=0xbdeddac, moveHelper=0xb566cae8)
>>>    at ../game/server/player_command.cpp:424
>>>
>>>
>>>
>>>
>>> (gdb) print pObject
>>> $3 = (IPhysicsObject *) 0x0
>>> (gdb) print this
>>> $4 = (CTripmineGrenade * const) 0xbdf5bf0
>>> (gdb)
>>>
>>>
>>> how on earth is pObject null when it was just created?
>>>
>>> 77          IPhysicsObject *pObject = VPhysicsInitNormal( SOLID_BBOX,
>>> GetSolidFlags() | FSOLID_TRIGGER, true );
>>> 78              pObject->EnableMotion( false );
>>>
>>> src\game\server\hl2mp\grenade_tripmine.cpp
>>>
>>>
>>> I am really really lost here.
>>>
>>> _______________________________________________
>>> To unsubscribe, edit your list preferences, or view the list archives,
>>> please visit:
>>> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>>>
>>>
>>>
>>> _______________________________________________
>>> To unsubscribe, edit your list preferences, or view the list archives, 
>>> please visit:
>>> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>>>
>>>
>>
>> _______________________________________________
>> To unsubscribe, edit your list preferences, or view the list archives, 
>> please visit:
>> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>>
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives, please 
> visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to