[article] Adding a zoom to the mp5

[article] Adding a zoom to the mp5

Re: [article] Adding a zoom to the mp5 Posted by Le Chief on Sat Sep 13th 2008 at 12:09am
Le Chief
2605 posts
Posted 2008-09-13 12:09am
Le Chief
member
2605 posts 937 snarkmarks Registered: Jul 28th 2006 Location: Sydney, Australia
This is a discussion topic for the article "Adding a zoom to the mp5" by aaron_da_killa which can be found here

Article description:

adding zoom functinality to your mp5
Loading embedded content: Article #182
Re: [article] Adding a zoom to the mp5 Posted by Dragos on Fri Aug 7th 2009 at 12:08pm
Dragos
2 posts
Posted 2009-08-07 12:08pm
Dragos
member
2 posts 0 snarkmarks Registered: Aug 7th 2009
Great tutorial! :) Everything is working perfectly except one little mistake you made in the code.

This line:

SetNextThink( 0.1 );

Should be replaced with this one:

pev->nextthink = gpGlobals->time + 0.1;

Because SetNextThink is not used in original HL SDK. It's a Spirit of Half-Life command.

By the way there is another little bug in-game, when you switch between normal and the zoom mode you can hear the grenade launch sound.

Sorry for my poor English. :oops:
Re: [article] Adding a zoom to the mp5 Posted by Le Chief on Fri Aug 7th 2009 at 12:38pm
Le Chief
2605 posts
Posted 2009-08-07 12:38pm
Le Chief
member
2605 posts 937 snarkmarks Registered: Jul 28th 2006 Location: Sydney, Australia
Good points. :)

I have to admit, when I wrote this tutorial I was n00by and used the Spirit Of Half-Life code instead of the proper Half-Life source code. Truth is the Spirit Of Half-Life code is a massive mess and real buggy!

As for the grenade sound, I didn't notice it, nice find. I should probably update the tutorial but it's been so long since I've opened the Half-Life code I've forgotten alot of stuff.
Aaron's Stuff
Re: [article] Adding a zoom to the mp5 Posted by Vortiguantian on Fri Aug 7th 2009 at 1:50pm
Vortiguantian
20 posts
Posted 2009-08-07 1:50pm
20 posts 36 snarkmarks Registered: May 5th 2009 Location: The last place you would think to look
Why not just delete the original grenade launcher .wav (that would be glauncher.wav and glauncher2.wav I belive)in half-life 1's .pak file?