Raised This Month: $32 Target: $400
 8% 

Realistic Bullet: Real-Life Bullet physics to CS - FINAL VERSION


Post New Thread Reply   
 
Thread Tools Display Modes
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 01-15-2021 , 18:58   Re: Realistic Bullet [v1.6]
Reply With Quote #41

Made some changes and some fixes. Prolly the last update until I found something else to do with it. These are the details of what have been changed:


- Now the bullet does damage to entities as well.
- Now the breakable entities, such as glasses, only breaks when the new bullet actually hits it, intead of instantly.
- Now the AWP does not lose damage with distance.
- Now the AWP does not ricochet, it must penetrate in any way.
- Now the shotguns fires 7 bullets instead of 10.
- Now the crack sound is only avaliable when the bullet is too fast.
- Now the 'dense texture' check does not exist.
- Now the ricochet angle is multiplied in different types of textures. Metal entities have more chances to penetrate, whereas wood and tiles have lower. The rest are the same.
- Now some of the bullets of both M3 and XM104 penetrates, but only through entities close enough.

- Added support for 7.62 callibers (most powerful one except AWP's ofc). Now it keeps more velocity after penetration, same for new direction (starts changing after the first penetration).
- Added a min distance to start losing damage. Strong callibers starts losing at 70.0 meters, weak ones starts at 35.0, shotguns at 15.0 meters.
- Added bullet_trail_life cvar to control the trail life.
- Added impact sounds on different types of textures (new sounds could be added).

- Changed the units check for valid origins through bullet's travel. Now it depends on the bullet velocity.
- Changed some speed values.
- Changed the check to allow ricochets depending of the speed of the bullet.

- Fixed the m3 and xm1014 bullets directions.
- Fixed the m3 and xm1014 damage calculation.
- Fixed the check for touching other bullets.
- Fixed the invalid origin check troughout the bullet's travel.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 01-15-2021 at 19:13.
EFFx is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 02-10-2021 , 21:46   Re: Realistic Bullet [v1.8]
Reply With Quote #42

I've updated to v1.8

I will try to make a video to show how it looks line in-game, but I played with some friends and it looks fire ^-^.
Some infos:




- Added support for water physic as well. When the user shoots inside the water, there's a velocity decreasement plus bullet rotation due the resistance of the water.
Also, the bullet loses the ability to penetrate, since it's messy rotation.

- Added a new variable to calculate the damage: bullet's speed. If it's too slow, the damage will be either decreased or no damage will be taken at all.
- Added support for non-listed weapons inside the .ini file.
- Added a cvar that manages whether the max penetration of each bullet is gonna be calculated from the max penetration factor or just by the bullet speed itself (the bullet will continue penetrating until it's damaged enough to stop).
- Added 'rbullet_bullet_camera' cvar that makes the shooter see where the bullet is going trought it's view itself.
- Added a small angle to make the AWP ricochet.
- Added a code that makes the bullet instantly hit the end position if distance is less than or equal to 1000 units (I've seen blind battles between players that were too close. Now the bullet drop applies only after 1000 units).
- Added 'rbullet_allow_tradekills' cvar which controls trade kills, when two players shoot each other and both bullets hits each one, killing both.
- Added more sounds effects on different types of textures.


- Now the bullet rotates when it penetrate or ricochet as well, depending of the conditios of the bullet, the ammount changes.
- Now the ricochet speed calculation depends on the angle that the bullet ricocheted.
- Now the whizz sound is played by the bullet itself.
- Now the crack sound happens when the bullet passes close to the player instead of when hitting. Also, only rifles will make the crack effect.


- Fixed the penetrations with the AWP.
- Fixed some calculations.
- Fixed the getEntityInTraceline() stock.
- Fixed penetration code for weapons that did not have penetration avaliable by the game itself.
- Fixed the invalid origin check for bullets outside the map.
- Fixed the whizz sound code.
- Fixed an issue with bullets hitting enemies even with the Shield on.
- Fixed the checks when the bullet ricochets.
- Fixed an issue with the bullet hitplace right at the ass getting called as head shot (was it an issue tho?).
- Fixed an issue with headshot hit while the enemy was crouched.



- Changed trail's cvars to the following:
rbullet_trail_type to 1
rbullet_trail_color_intensity to 15
rbullet_trail_color to 200000000 (red)
- Changed some bullet drop/gravity values so the bullets doesn't seems too hard to hit something.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
Sinful Light
New Member
Join Date: Feb 2021
Old 02-11-2021 , 20:03   Re: Realistic Bullet: Real-Life Bullet physics to CS
Reply With Quote #43

There is 1 error that pops up to me (and few warnings of warning 213: tag mismatch) when I try to compile this using amxx 1.8.2.

line 192:
Code:
{
    ...
    "weapons/weapon_passby8.wav",
}

Last edited by Sinful Light; 02-11-2021 at 20:06. Reason: its just 1 error (not errors)
Sinful Light is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 02-11-2021 , 20:44   Re: Realistic Bullet: Real-Life Bullet physics to CS
Reply With Quote #44

Since I used the lastest version, this error did not pop up because it automatically ignores... thank you for saying.
Added gameplay videos in the main post ;)
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 02-23-2022 at 20:19.
EFFx is offline
Marinovv327
Member
Join Date: Jan 2018
Old 05-24-2021 , 03:39   Re: Realistic Bullet: Real-Life Bullet physics to CS
Reply With Quote #45

The plugin is good, but I don't think it will be successful on any server.
Marinovv327 is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 05-27-2021 , 00:20   Re: Realistic Bullet: Real-Life Bullet physics to CS
Reply With Quote #46

I agree. Firstly because people plays the instant impact effect since the game came out. Secondly, the physics change in a dead game will not be effective, but the work itself is gorgeous. I invested on it already knowing that it wouldn't be used as default physics in-game, because I wanted to acknowledge more things about bullet effects after impact and during the trajectory (and I did). I'm a very curious person, I love to know how things works even tho it wouldn't change anything in my life... maybe...

The plugin itself wouldn't be a good idea to be used in 32/32 servers since it creates entities for bullets management. I recommend (if you use it at first place) a server that have low players, such as pug/mix servers.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 05-27-2021 at 00:28.
EFFx is offline
Agent3554
Junior Member
Join Date: Aug 2020
Old 05-29-2021 , 09:17   Re: Realistic Bullet: Real-Life Bullet physics to CS
Reply With Quote #47

Quote:
Originally Posted by EFFx View Post
- More details about impact sounds, bullet crack and whizz from
players far away from you.
Eh? This doesn't show up when I'm looking for bullet whiz with snap/cracks, the only other Bullet Whiz appeared

I didn't realized it's also a feature in this plugin too, now that I've discovered it, I'm going to have fun playing with this

Would this plugin apply to bots as well, I wonder? Or maybe just simply shoot straight as it is?


Quote:
Originally Posted by Marinovv327 View Post
The plugin is good, but I don't think it will be successful on any server.
It's quite enjoyable in single player (vs bots) gameplay, I wonder if Hellstrike mod comes out, maybe it'll make it more appealing

Last edited by Agent3554; 05-29-2021 at 09:24. Reason: merged comment
Agent3554 is offline
Old 05-29-2021, 09:19
Agent3554
This message has been deleted by Agent3554. Reason: merged to the previous comment
Old 05-29-2021, 09:20
Agent3554
This message has been deleted by Agent3554. Reason: ditto
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 05-30-2021 , 15:48   Re: Realistic Bullet: Real-Life Bullet physics to CS
Reply With Quote #48

Quote:
Originally Posted by Agent3554 View Post
Eh? This doesn't show up when I'm looking for bullet whiz with snap/cracks, the only other Bullet Whiz appeared

I didn't realized it's also a feature in this plugin too, now that I've discovered it, I'm going to have fun playing with this

Would this plugin apply to bots as well, I wonder? Or maybe just simply shoot straight as it is?

It's quite enjoyable in single player (vs bots) gameplay, I wonder if Hellstrike mod comes out, maybe it'll make it more appealing
This plugin applies to every player/entity that triggers the shooting event for the bullets to be created. The plugin manages every bullet physics noticeable as good as my experience could see and apply in-game. You can have fun with some friends too, but as I said it shouldn't be used with full server since too many entities would be created and a lot of calculations done in a single second.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 05-30-2021 at 15:48.
EFFx is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 02-06-2022 , 21:49   Re: Realistic Bullet: Real-Life Bullet physics to CS
Reply With Quote #49

Updated to v1.9

- Fixed lags when there's too many bullets flying around.
- Fixed the effect when the bullet penetrates an entity on bTooClose checks.
- Fixed the bullet crack not being able to hear due the whizz sound overriding it.
- Changed the iUnitsCheck to 0 when the bullet is allowed to ricochet.
It fixes the distance before the bullet ricochet, making it actually hit entities before ricocheting.
- Added kRenderFxDistort new effect as default for the bullet, total of 3 effects.
- Now you cannot see the previous impact from enemies or neither yours (due client-side effects). The only effects is when the bullet actually hits an entity.

OBS: It was needed to recreate the animations and default weapon sounds for the previous impact remover.

PHP Code:
// Re-creates the default bullet decals effects created by the game
// so with it the plugin removes the pre-effects client-sided.
// Since it re-creates default sounds as well, maybe some users
// has their own plugin which manages firing effects by themselves
// so add // before it to remove this feature
#define RECREATE_DEFAULT_EFFECTS 
-

Plugin's effects are as I wanted to be, maybe more realistic features will be added soon on the 2.0 version, which will be the last one. More calculations and work on how the bullet behave could be added sooner with the last version.
Cya.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 02-23-2022 at 23:53.
EFFx is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 02-23-2022 , 23:40   Re: Realistic Bullet: Real-Life Bullet physics to CS
Reply With Quote #50

Updated to 2.0 - FINAL VERSION

Changes

- Changed the underwater physics a little.
- Changed the function that gets the bullet's end point, EngFunc_TraceToss helped.
- Changed some values on bullet rotation feature after penetrations.
- Changed ricochet damage base constant.
- Changed the way that bullets penetrates through entities.
Now instead of checking X units ahead every time (which causes issues), the bullet has a think delay that only triggers penetration feature when the bullet is about to hit.
It makes bullet penetrations more accurate, even if the penetrations happens too fast.

- Changed speed calculation after penetrations. Bullets gets more slower than before.
- Changed speed calculation after ricochets. Bullets gets more slower than before.
- Changed speed values from some weapons, update realistic_bullet.ini.
- Changed penetration factor from some weapons, update realistic_bullet.ini.
- Changed angle of ricochet from some weapons, update realistic_bullet.ini.
- Changed the angles values of ricochet, they are now more realistic. Update realistic_bullet.ini.
- Changed BULLET_MIN_SPEED to 3000.0 Units Per Second.
- Changed the Distance Equation to reduce the damage of the bullet.
- Changed the min speed constant values from some equations.

Fixes

- Fixed an issue with shield not being able to block bullets when they have penetrated an object.
- Fixed default sound precache issue on first precache attempt.
- Fixed the shield firing animation.
- Fixed shotguns bullet hit decals.
- Fixed an effect with bullets bouncing while underwater...
- Fixed the speed decrease when penetrating entities.
- Fixed bullet hit on players when penetrating entities (ty EngFunc_TraceToss).
- Fixed FOV values when firing with snipers.
- Fixed issues with rbullet_ffa cvar. When its 0 bullets will pass through teammates, opposite as when it is 1.
- Fixed issues with shotguns fire event. It was making only ONE bullet think and cancelling the rest ones.
- Fixed issues with bullets getting stuck inside the ground when ricocheting (rarely, but was happening).
- Fixed issues with bullet ricocheting after hitting the player's head (it started happening when I changed to 1.10 for some reason... weird).
- Fixed issues with the thickness checks in some weapons.

Features Added

- Now there is invisible option for the bullets, rbullet_trail_type should be 3.
- Now there is only instant hit on players. Default hit on the map itself will still have the bullet drop feature.
- Now the bullet drop factor is based on bullet speed instead of globally checking it for 1000 units.
- Now there is not rbullet_use_penetration_factor cvar. By default all bullets will keep penetrating until it loses power.
- Now there are just 2 new ricochet sounds, 10 in total.
- Now there are Bullet Snow Impact sounds, 5 in total.
- Now there are two cvars: rbullet_allow_penetration and rbullet_allow_ricochet. Helps to decrease large calculations that each feature has.
- Now you can see the default bullet path by the game using rbullet_show_default_path. Also, the trail color with rbullet_default_trail_color.
- Now the bullet direction goes down after each penetration.
- Now the bullets always bounce when too slow, unless it is the water or hits sky. The speed of the bounce depends of the angle the bullet hit the wall/entity. Also, there's more bullet rotations after every bounce.
- Now too low speeds are no longer avaliable. Default minimum speed is controlled by BULLET_MIN_SPEED, which is 3000.0 UPS.
- Now the shotguns does not penetrate anymore.
-------------------------------

There is some comments in the code if someone wants to understand easier.
I rest my case.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 04-01-2022 at 20:34.
EFFx is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:30.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode