Have you tried to debug your code in MSVC ? Then, you'll see where it
crashes using the stack window.
It can be an odd pointer problem :p It's often the dummy things that make
the most strange problem :p
- Cortex : HL ALBATOR coder & mapper
- [EMAIL PROTECTED] & ICQ : 71548738
Bodek wrote:
> Hi!
>
> I'm new here and I have problems with adding new weapons. First od
> all I will try to explain what I do in sdk (I'm sure everything I
> done properly). But every time I'm picking up the weapon (my or
> orginal weapon (like shotgun) engine crashes with annoying windows
> message 'Program run bad code...' (I'm not sure it's equivalent to
> english message, because I'm from Poland and I'm using polish version
> of MS Windows, but I'm think you know what I mean) or sometimes when
> weapon were picked up and I'm trying to shoot(any weapon), game
> crashes again with this same windows message.
> 1. New weapon based on MP5 source code (a little changed code), also
> is a new ammo
> 2. Weapon and ammo was precached with
> UTIL_PrecacheOtherWeapon(),UTIL_PrecacheOther() in weapons.cpp
> 3. In cl_dlls/hl/hl_weapons.cpp I'm added: new variable based on my
> new weapon class:
>
> CTripmine g_Tripmine;
> CSqueak g_Snark;
> CMinigun g_Minigun; //my weapon
>
> 4. HUD_PrepEntity( &g_Minigun, &player);
> 5. HUD_WeaponsPostThink() - in this function I'm added a piece of
> code like this:
>
> case WEAPON_MINIGUN:
> pWeapon = &g_Minigun;
> break;
>
> 6. I'm also added some code into ev_hldm.cpp file (function like
> EV_FireMP5)
> 7. in hl\hl_events.cpp added gEngfuncs.pfnHookEvent(
> "events/minigun.sc", EV_FireMinigun );
>
> Also I added some code in other files, but just cvars for new ammo.
> What's wrong ?
>
> I'm sorry if I asking of thing which might be asked and solved in
> past but I didn't viewed all the archive of this list.
>
> with respect for real programmers
>
> Bodek
>
>
>
> ***************r-e-k-l-a-m-a**************
>
> Masz dosc placenia prowizji bankowi ?
> mBank - zaloz konto
> http://epieniadze.onet.pl/mbank
> _______________________________________________
> 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