First commit

This commit is contained in:
Fierelier 2023-07-27 22:44:19 +02:00
commit 170e99bc95
4 changed files with 113 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.cs

9
LICENSE Normal file
View File

@ -0,0 +1,9 @@
MIT License
Copyright (c) 2023
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

16
README.txt Normal file
View File

@ -0,0 +1,16 @@
This mod shakes your camera if you shoot your gun. How much the camera shakes, depends on the gun.
Download: http://fier.me/software/vc-camshake_shooting
How to install:
* Pick one .cs from a folder and put it in your game's CLEO folder.
Guns:
* Light (0.5x): Colt, Tec-9, Uzi, Ingram, Flame Thrower
* Medium (1.0x): Python, MP5, M4, Ruger, Sniper Rifle, Laser Sniper
* Mediumlarge (1.5x): M60, Minigun
* Large (2.0x): Shotgun, Spaz Shotgun, Stubby Shotgun, RPG
Changelog:
* 1.0:
* First release

87
vc-camshake_shooting.txt Normal file
View File

@ -0,0 +1,87 @@
{$CLEO .cs}
0000:
var
0@ : Int // Old weapon
1@ : Int // Old ammo
2@ : Int // New weapon
3@ : Int // New ammo
4@ : Int // Camshake multiplier
end
0470: 0@ = actor $PLAYER_ACTOR armed_weapon
0419: 1@ = player $PLAYER_CHAR weapon 0@ ammo
:LOOP
wait 0
0470: 2@ = actor $PLAYER_ACTOR armed_weapon
0419: 3@ = player $PLAYER_CHAR weapon 2@ ammo
if
0@ <> 2@ // Weapon changed
then // Do not shake
jump @UPDATE
end
if
1@ > 3@ // Ammo decreased
then // Shake
jump @SHAKE
end
jump @UPDATE
:UPDATE
// Update old weapon/ammo
0@ = 2@
1@ = 3@
jump @LOOP
:SHAKE
4@ = 100
if or // Light weapons
2@ == 17 // Colt
2@ == 22 // Tec-9
2@ == 23 // Uzi
2@ == 24 // Ingram
2@ == 31 // Flame Thrower
then
4@ *= 0.5
jump @SHAKE2
end
if or // Medium weapons
2@ == 18 // Python
2@ == 25 // MP5
2@ == 26 // M4
2@ == 27 // Ruger
2@ == 28 // Sniper Rifle
2@ == 29 // Laser Sniper
then
4@ *= 1
jump @SHAKE2
end
if or // Medium-large weapons
2@ == 32 // M60
2@ == 33 // Minigun
then
4@ *= 1.5
jump @SHAKE2
end
if or // Large weapons
2@ == 19 // Shotgun
2@ == 20 // Spaz Shotgun
2@ == 21 // Stubby Shotgun
2@ == 30 // RPG
then
4@ *= 2
jump @SHAKE2
end
// Unlisted weapons
jump @UPDATE
:SHAKE2
0003: 4@
jump @UPDATE