diff options
| author | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-09-27 21:38:38 +0000 |
|---|---|---|
| committer | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-09-27 21:38:38 +0000 |
| commit | c2b6adeb627d81dc7cddb0024932e846aa46ecb3 (patch) | |
| tree | 5f82c2e43a13c8d5a6d815e09801a62777098b76 /src/base | |
| parent | 44f8cf9519a45f732613d76fc09a97648fd6e1d7 (diff) | |
- sebevražda (vč. vlastní miny) odečítá body (např. střelou skrze teleporty)
- ta predsa som cez weekend nieco napisal :)
git-svn-id: http://opensvn.csie.org/tuxanci_ng@281 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'src/base')
| -rw-r--r-- | src/base/item.c | 5 | ||||
| -rw-r--r-- | src/base/tux.c | 10 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/base/item.c b/src/base/item.c index 1e8901d..300e3d1 100644 --- a/src/base/item.c +++ b/src/base/item.c @@ -382,6 +382,11 @@ static void eventTuxIsDeadWithItem(tux_t *tux, item_t *item) tuxTeleport(tux); return; } + if (item->author_id == tux->id) { + tux->score--; + if (getNetTypeGame() == NET_GAME_TYPE_SERVER) + proto_send_newtux_server(PROTO_SEND_ALL, NULL, tux); + } if (item->author_id != tux->id) { tux_t *author; diff --git a/src/base/tux.c b/src/base/tux.c index 352487d..a8e40b5 100644 --- a/src/base/tux.c +++ b/src/base/tux.c @@ -343,6 +343,16 @@ void eventTuxIsDead(tux_t *tux) static void eventTuxIsDeadWIthShot(tux_t *tux, shot_t *shot) { + if( shot->author_id == tux->id ) + { + tux->score--; + + if( getNetTypeGame() == NET_GAME_TYPE_SERVER ) + { + proto_send_newtux_server(PROTO_SEND_ALL, NULL, tux); + } + } + if( shot->author_id != tux->id ) { tux_t *author; |