Author
Topic: DeadSouls 2.1 Ranged Weapon Inherit (Read 1873 times)

I decided to make a ranged weapon inherit based off Crat's pistol inherit. The pistols were cool, but I wanted a generic ranged weapon inherit so I could make assault rifles, etc. I originally wanted to make a nailgun (specifically the 10mm HV Penetrator from F.E.A.R.) and that's what inspired me to create a generic ranged weapon inherit. Credit goes to Cratylus for the original pistol.c, I only edited it a bit, adding different functionality, as well as cleaning up and optimizing some code. One caveat is that I added functionality to combat.c for ranged weapons, too. Without that, this is just a thing that causes damage to an opponent, I recommend adding ranged functionality to combat.c if you're actually going to implement ranged weapons.

Here it is: ranged.c

LPC code:

/* Originally created as pistol.c by Cratylus @ Dead Souls Demo * Edited and enhanced (haha) by Tigwyk @ LP Heroes (Some time in 2006, probably August) * * New functions include an ability to specify NO shells drop after firing, * as well as using GetName() to show the name of the weapon in returns instead * of just "pistol" or a static string. * */