summaryrefslogtreecommitdiff
path: root/md/writeup/sauerbraten_patching_and_cheating.md
blob: dde52980b0f7762659fa95e9bfe1955c2312d7a5 (plain) (blame)
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
title:Sauerbraten patching and cheating
keywords:sauerbraten,patch,cheat,ban

# Sauerbraten patching and cheating

NOTE: Remember this patches is cheat/like and it is not good to play with others when this patches is added because they loose their enjoyment of game. Remember of FREEDOM to be banned.


sauerbraten is open source first person shooter. Also there is multi player
mode. I like time to time play sauerbraten. But I am not very good player.

As game source is comes with game you can view it and add some patches that
can help get better scores in games. Usually it called cheating.
As this features/cheats is made by my self I don't think so. But in game admins
don't care =] about it.

First of all this patches don't make game enjoyable for other players
that way sooner or later you will be banned. Every one have freedom to
be banned.

First "allowed" cheat is recoil to 0 from any weapon

in file src/fpsgame/game.h on line 333:

```c
static const struct guninfo { short sound, attackdelay, damage, projspeed, part, kickamount, range; const char *name, *file; } guns[NUMGUNS] = 
 { 
 { S_PUNCH1, 250, 50, 0, 0, 0, 14, "fist", "fist" }, 
 { S_SG, 1400, 10, 0, 0, 20, 1024, "shotgun", "shotg" }, // *SGRAYS 
 { S_CG, 100, 30, 0, 0, 7, 1024, "chaingun", "chaing"}, 
 { S_RLFIRE, 800, 120, 80, 0, 10, 1024, "rocketlauncher", "rocket"}, 
 { S_RIFLE, 1500, 100, 0, 0, 30, 2048, "rifle", "rifle" }, 
 { S_FLAUNCH, 500, 75, 80, 0, 10, 1024, "grenadelauncher", "gl" }, 
 { S_PISTOL, 500, 25, 0, 0, 7, 1024, "pistol", "pistol" }, 
 { S_FLAUNCH, 200, 20, 50, PART_FIREBALL1, 1, 1024, "fireball", NULL }, 
 { S_ICEBALL, 200, 40, 30, PART_FIREBALL2, 1, 1024, "iceball", NULL }, 
 { S_SLIMEBALL, 200, 30, 160, PART_FIREBALL3, 1, 1024, "slimeball", NULL }, 
 { S_PIGR1, 250, 50, 0, 0, 1, 12, "bite", NULL }, 
 { -1, 0, 120, 0, 0, 0, 0, "barrel", NULL } 
 };
```

changing sixths values all to 0 makes no recoil.
but if you change recoil to 1024 you can easily jump on the sky after shut.
Think what will see your on-line opponents? Someone if shutting from the skies.

Not-flying rocket? Yes you can make it.
fourth field in structure is projspeed change it for rocket launcher to
0 and you can place your rockets on air. Bet I don't know what see others.
Only thing with that you will get ban for team-killing because team mates
are usually around you and they blow-up when colliding with rockets in air.

Precision also is very nice but every one will notice that you shutting with shotgun
and chain-gun with precision like rifle.
In src/fpsgame/weapon.cpp on 130 line:

```c
void offsetray(const vec &from, const vec &to, int spread, float range, vec &dest) 
   { 
       float f = to.dist(from)*spread/1000; 
       for(;;) 
       { 
           #define RNDD rnd(101)-50 
           vec v(RNDD, RNDD, RNDD); 
           if(v.magnitude()>50) continue; 
           v.mul(f); 
           v.z /= 2; 
           dest = to; 
           dest.add(v); 
           vec dir = dest; 
           dir.sub(from); 
           dir.normalize(); 
           raycubepos(from, dir, dest, range, RAY_CLIPMAT|RAY_ALPHAPOLY); 
           return; 
       } 
   }
```

make

```c
#define RNDD rnd(2)-1
```

and it will work fine.