AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   MyPhysics v0.3.1 (https://forums.alliedmods.net/showthread.php?t=52027)

Simon Logic 03-01-2007 08:59

MyPhysics v0.3.1
 
1 Attachment(s)
Features (RUS):
  • unlocks sv_accelerate, sv_stopspeed & sv_friction restrictions to default values under CS/CZ
  • allows to customize fall damage & safe fall speed (you can make the game like in HLDM when mp_falldamage = 0) - this feature should override plugin No Fall Damage by v3x
  • adds damage on head bump (customizable)
  • adds damage to a player on what you've just falled: you can damage him or kill him & that frag will be counted (also customizable)
Requirements:
* any mod (preferably CS/CZ)
* AMX/X 1.7x or higher
* Fakemeta module

New cvars: ([CS] means cvar is available under CS/CZ mod only)
* [CS] my_accelerate <float> (default=10)
overrides sv_accelerate value;
0 - turn off (use original gameplay restricted value)
5 - turn off also (read the note section below)
* [CS] my_stopspeed <float> (default=100)
overrides sv_stopspeed value;
0 - turn off (use original gameplay restricted value)
75 - turn off also (read the note section below)
* [CS] my_friction <float> (default=4)
overrides sv_stopspeed value;
0 - turn off (use original gameplay restricted value)
4 - turn off also (read the note section below)
* my_falldamage <num> (default=10)
0 - no damage at all
-1 - off (default gameplay rules)
* my_safefallspeed <num> (default=580)
* my_raisedamage <num> (default=5)
* my_saferaisespeed <num> (default=190)
* my_fallimpulse <float> (default=1.0)
1.0 - make the player below the same damage as falldamage
(true physics)
0.5 - make the half of falldamage
10.0 - make 10x more of falldamage (if max_health is 100 &
my_falldamage is 10, it will kill any player below)
0.0 - turn impulse damage off
* [CS] my_maxspeed <float> (default=-1)
sets constant player's maxspeed no matter what weapon type is used;
applied on game start & when player has changed his weapon during
the game
-1 - turn off (use original gameplay algorithm)

Notes:
  • when working with my_accelerate, my_stopspeed & my_friction
    you must understand that if you init them with default gameplay
    values it's assumed like you disable custom values
    (e.g. 'my_accelerate 5' and 'my_accelerate 0' are identical).
    You can't set back custom value just by changing my_ cvar only cause
    you must set appropriate sv_ cvar to ANY non-standard value to trigger
    unlock (i.e. set my_accelerate to 10 first, then set sv_accelerate
    to any value, except 5. After that any changing of my_accelerate will
    trigger sv_accelerate to synchronize its value until you set
    my_accelerate to 0 or 5). You can freely set custom values directly
    via sv_ cvars (they won'e be reseted) after you've set custom value
    like decribed above but my_ values won't be synchronized in this case.
    So you see that they are used as initial values mostly. Thus i recommed
    you set custom values via my_ cvars only.
  • side effect of unlocking physics cvars is occurrence of bunny jump
TODO:
* consider helmet presence on head bump (under CS/CZ only)
* make 'my_fallimpulse' to work when my_falldamage is -1

Credits:
* VEN for couple of fakemeta_util functions
* KRoT@L for his AMX NoBuy - Fall Damage plugin which was a starting
point for my plugin

History:
0.3.1 [2007-03-04]
! fixed half-broken implementation of unlocking cvars
+ added a huge description on how to work with unlocking cvars
! fallimpulse damage now considers mp_friendlyfire value
! fallimpulse kill scoring now considers teamplay rules
+ added 'my_maxspeed' cvar
... (see .sma file for full changelog)

Emp` 03-01-2007 09:35

Re: MyPhysics v0.3.0
 
Looks great. Nicely done. Only thing I can suggest is that you change
Code:

public cmdFullupdate()
{
        // just block this command to block ResetHUD msg on client request
        return PLUGIN_HANDLED
}

to
Code:

return PLUGIN_HANDLED_MAIN
so it just blocks it for your plugin.

Will approve in 1 day. Letting people see it in New Submissions.

Skissors 03-01-2007 11:50

Re: MyPhysics v0.3.0
 
amazing plugin, tested and it worked

Simon Logic 03-03-2007 19:05

Re: MyPhysics v0.3.1
 
Updated to 0.3.1.

Those who has downloaded 0.3.0 strongly recommend to update. Now you can make exactly the same physics as it was in HLDM =)

Changelog:
! fixed half-broken implementation of unlocking cvars
+ added a huge description on how to work with unlocking cvars
! fallimpulse damage now considers mp_friendlyfire value
! fallimpulse kill scoring now considers teamplay rules
+ added 'my_maxspeed' cvar

Emp`, thanx for approvement. Your code sample was considered, tested & implemented ;)

Simon Logic 11-20-2007 07:15

Re: MyPhysics v0.3.1
 
2connorr (may be interesting to others): yep, i'm gonna to update this plugin to support HS module, cause i need an appropriate log for PsychoStats on fall kill but HLDM will not be supported then.

kobri 11-25-2008 07:13

Re: MyPhysics v0.3.1
 
Can someone explain those cvars, tried tweaking them to get less damage from jumping for my hns servers, however no luck so far.

* my_safefallspeed <num> (default=580)
* my_raisedamage <num> (default=5)
* my_saferaisespeed <num> (default=190)

Simon Logic 12-02-2008 15:12

Re: MyPhysics v0.3.1
 
my_safefallspeed means player's max downward z-velocity exceeding which the my_falldamage damage is guaranteed on landing.

my_saferaisespeed is almost the same but for head bumping on ceiling i.e. upward z-velocity is considered (damage quantity is taken from my_raisedamage cvar in this case).

kobri 12-03-2008 03:41

Re: MyPhysics v0.3.1
 
Thanks Simon, any chance to "* make 'my_fallimpulse' to work when my_falldamage is -1" anytime soon ?

It is awesome for Hide'n'Seek servers! Also please take a look at this idea http://forums.alliedmods.net/showthread.php?t=80327, I think you have the needed skills to code it.


All times are GMT -4. The time now is 05:43.

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