[article] Adding a zoom to the mp5
Post Reply
Quote
Re: [article] Adding a zoom to the mp5
Posted by Le Chief on Sat Sep 13th at 12:09am 2008



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






Quote
Re: [article] Adding a zoom to the mp5
Posted by Dragos on Fri Aug 7th at 12:08pm 2009


Great tutorial! smiley 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. smiley




Quote
Re: [article] Adding a zoom to the mp5
Posted by Le Chief on Fri Aug 7th at 12:38pm 2009


Good points. smiley

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.







Quote
Re: [article] Adding a zoom to the mp5
Posted by Vortiguantian on Fri Aug 7th at 1:50pm 2009


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?




Post Reply