forked from nrlulz/ACF
-
Notifications
You must be signed in to change notification settings - Fork 8
/
readme.txt
132 lines (96 loc) · 4.22 KB
/
readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
------------------
-- INSTALLATION --
------------------
- If you are updating a previous installation of ACF and you're having issues with
vanilla particles (fire, blood) not showing up, delete your garrysmod/particles/
directory.
- It is not necessary to copy the scripts or particles directories anymore.
---------------------------------------------------------------
-- IF YOU WANT ACF POWERED STUFF TO GO MORE REALISTIC SPEEDS --
---------------------------------------------------------------
Put these two lines in your server.cfg:
lua_run local tbl = physenv.GetPerformanceSettings() tbl.MaxAngularVelocity = 30000 physenv.SetPerformanceSettings(tbl)
lua_run local tbl = physenv.GetPerformanceSettings() tbl.MaxVelocity = 20000 physenv.SetPerformanceSettings(tbl)
This will raise the angular velocity limit (wheels spinning) and forward speed limit.
--------------------
-- FOR DEVELOPERS --
--------------------
Frankess has added some handy hooks that can be used to limit damage and explosions
and such. They are as follows:
ACF_BulletsFlight( Index, Bullet )
Return false to skip checking if the bullet hit something
Args:
- Index (number): the bullet's index
- Bullet (BulletData): the bullet object
ACF_BulletDamage( Type, Entity, Energy, Area, Angle, Inflictor, Bone, Gun, IsFromAmmo )
Return false to prevent damage
Args:
- Type (string): the ACF entity type (prop/vehicle/squishy)
- Entity (entity): the entity being hit
- Energy (table): kinetic energy
- Area (number): area in cm^2
- Angle (number): angle of bullet to armor
- Inflictor (player): owner of bullet
- Bone (number): the bone being hit
- Gun (entity): the gun that fired the bullet
- IsFromAmmo (boolean): true if this is from an ammo explosion (don't think this is implemented yet)
ACF_FireShell( Gun, Bullet )
Return false to prevent gun from firing
Args:
- Gun (entity): the gun in question
- Bullet (BulletData): the bullet that would be fired
ACF_AmmoExplode( Ammo, Bullet )
Return false to prevent ammo crate from exploding
Args:
- Ammo (entity): the ammo crate in question
- Bullet (BulletData): the bullet that would be fired
ACF_FuelExplode( Tank )
Return false to prevent fuel tank from exploding
Args:
- Tank (entity): the fuel tank in question
ACF_CanRefill( Refill, Ammo )
Return false to prevent ammo crate from being refilled (not yet implemented)
------------------------
Damage Protection hooks:
ACF_PlayerChangedZone
This hook is called whenever a player moves between the battlefield and a safezone, or between safezones.
This hook is called regardless of damage protection mode e.g. during build mode where safezones are irrelevant.
Args;
ply Player: The player who has just transitioned from one zone to another.
zone String: The name of the zone which the player has moved into (or nil if moved into battlefield)
oldzone String: The name of the zone which the player has exited (or nil if exited battlefield)
ACF_ProtectionModeChanged
This hook is called whenever the damage protection mode is altered.
This hook is also called once at startup, when the damage protection mode is initialized to "default" (oldmode = nil during this run).
Args;
mode String: The name of the newly activated damage protection mode.
oldmode String: The name of the damage protection mode which has just been deactivated.
-----------------------
Bullet table callbacks:
For the argument list (Index, Bullet, FlightRes):
Index: Index of the bullet in the bullet-list.
Bullet: The bullet data table.
FlightRes: The results of the bullet trace.
- - - - - -
OnEndFlight(Index, Bullet, FlightRes)
called when a bullet ends its flight (explodes etc)
OnPenetrated(Index, Bullet, FlightRes)
when a bullet pierces the world or an entity
OnRicochet(Index, Bullet, FlightRes)
when a bullet bounces off an entity
PreCalcFlight(Bullet)
just before the bullet performs a flight step
PostCalcFlight(Bullet)
just after the bullet performs a flight step
HandlesOwnIteration
this is just a key: put it into the bullet table to prevent ACF from iterating the bullet. You can then iterate it yourself in different places.
---------------------
Engine model scaling:
V engines
Large 1.0
Medium 0.665
Small 0.532
Inline engines
Large 1.0
Medium 0.6
Small 0.4