Skip to content
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.

Commit

Permalink
Fix usage examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeblote authored Feb 4, 2017
1 parent b74b89e commit 2ad6032
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ You can change this by using the `$TypeMasks::PlayerObjectTypeHidden` and `$Type
If you need to modify the default behavior, you can do something like this: `$TypeMasks::PlayerObjectType = $TypeMasks::PlayerObjectTypeAll;`
## Modifying collision behavior (examples)
You will need to install [MoveHandler](https://github.com/portify/MoveHandler) for some of these to work.
For unknown reasons MoveHandler crashes your server if you spawn a hole bot.
### Prevent vehicles from colliding with any players:
```
$Physics::VehicleCollisionMask &= ~$TypeMasks::PlayerObjectTypeAll;
Expand All @@ -43,7 +44,7 @@ $Physics::VehicleCollisionMask |= $TypeMasks::PlayerObjectTypeAll;
```
### Allow players in the second layer to walk through players in the first layer:
```
funtion onPlayerProcessTick(%player, %move)
function onPlayerProcessTick(%player, %move)
{
if(%player.getType() & $TypeMasks::PlayerObjectTypeHidden)
{
Expand All @@ -59,7 +60,7 @@ funtion onPlayerProcessTick(%player, %move)
```
### Players collide with other players in the same layer, and pass through players in the other:
```
funtion onPlayerProcessTick(%player, %move)
function onPlayerProcessTick(%player, %move)
{
if(%player.getType() & $TypeMasks::PlayerObjectTypeHidden)
{
Expand All @@ -84,7 +85,7 @@ funtion onPlayerProcessTick(%player, %move)
$Physics::PlayerMoveMask |= $TypeMasks::PlayerObjectTypeAll;
$Physics::PlayerContactMaskServer |= $TypeMasks::PlayerObjectTypeAll;
funtion onPlayerProcessTick(%player, %move)
function onPlayerProcessTick(%player, %move)
{
if(%player.getType() & $TypeMasks::PlayerObjectTypeHidden)
{
Expand Down

0 comments on commit 2ad6032

Please sign in to comment.