#1 2016-06-10 05:38:46

bobsimov
Member

Penetration of walls

Is it possible to have wall penetration for the rail gun rifle ? Can it be achieve via a simple script or i have to code it ?

Thanks in advance ! :)

Offline

#2 2016-06-15 04:13:15

chasester
Member

Re: Penetration of walls

depends how you wanna define a "wall" you can put up clip and that will allow you to shoot through it but not walkthrough it. other wise there are a few "clip" hacks you can imploy but i think the easiest way to do it is just to create a new material called "Shoot-Through" (or something of that nature) in the c++ and then just when you do bullet checks in the shoot() function in weapons.cpp (its burried in a variety of hit() then a function called raytest() in physics.cpp. (NOTE THIS IS ALL FROM MEMORY SO IM NOT 100%). But you can basically check if a block has material MAT_SHOOT_THROUGH and if it does then just continue the ray test. Every thing else shoot work smoothly if you do it right (cuz the rifle trail is drawn from the vectors passed back from this function).

alternatively there are some underground secrets that allow certain things to pass and others to not. but i would suggest just changing the code it will be the cleanest way to accomplish this.

if you have further questions please ask :)
chasester

Offline

#3 2016-06-16 18:47:01

bobsimov
Member

Re: Penetration of walls

any existing solutions / hacks ?

Offline

#4 2016-06-18 22:09:39

chasester
Member

Re: Penetration of walls

i did one for someone on this form :) its a major hack but i have a video and src :)

forum topic

video

most the stuff i say is the solution, but basically it just a matter of using the edit commands in the shoot command or in the explode command (for projectiles).

Offline

Board footer