Merge branch 'master' of git://github.com/oy/teeworlds

Conflicts:
	src/engine/external/pnglite/pnglite.c
	src/engine/external/pnglite/pnglite.h
	src/engine/shared/config_variables.h
	src/game/client/components/menus_browser.cpp
	src/game/server/entities/character.cpp
	src/game/server/entities/laser.cpp
	src/game/server/gamecontext.cpp
	src/game/server/player.cpp
	src/game/version.h
This commit is contained in:
GreYFoX 2011-05-09 18:36:13 +02:00
commit cc63cf2553
71 changed files with 1247 additions and 413 deletions

View file

@ -106,7 +106,7 @@ AddDependency(network_source, network_header)
AddDependency(client_content_source, client_content_header)
AddDependency(server_content_source, server_content_header)
nethash = CHash("src/game/generated/nethash.c", "src/engine/shared/protocol.h", "src/game/generated/protocol.h", "src/game/tuning.h", "src/game/gamecore.cpp", network_header)
nethash = CHash("src/game/generated/nethash.cpp", "src/engine/shared/protocol.h", "src/game/generated/protocol.h", "src/game/tuning.h", "src/game/gamecore.cpp", network_header)
client_link_other = {}
client_depends = {}

View file

@ -657,6 +657,9 @@ no limit
##### needs translation #####
Demofile: %s
==
Play background music
==
@ -666,5 +669,8 @@ Spectate next
Spectate previous
==
Strict gametype filter
==
##### old translations #####

View file

@ -657,6 +657,9 @@ no limit
##### needs translation #####
Demofile: %s
==
Play background music
==
@ -666,6 +669,9 @@ Spectate next
Spectate previous
==
Strict gametype filter
==
##### old translations #####
Page %d of %d

View file

@ -657,6 +657,9 @@ no limit
##### needs translation #####
Demofile: %s
==
Play background music
==
@ -666,5 +669,8 @@ Spectate next
Spectate previous
==
Strict gametype filter
==
##### old translations #####

View file

@ -657,6 +657,9 @@ no limit
##### needs translation #####
Demofile: %s
==
Play background music
==
@ -666,6 +669,9 @@ Spectate next
Spectate previous
==
Strict gametype filter
==
##### old translations #####
##### translated strings #####

View file

@ -388,6 +388,9 @@ Pistol
Play
== Spelen
Play background music
== Speel achtergrondmuziek
Player
== Speler
@ -538,6 +541,12 @@ Sound volume
Spectate
== Toekijken
Spectate next
== Volg volgende speler
Spectate previous
== Volg vorige speler
Spectator mode
== Toeschouwer modus
@ -657,13 +666,10 @@ no limit
##### needs translation #####
Play background music
Demofile: %s
==
Spectate next
==
Spectate previous
Strict gametype filter
==
##### old translations #####

View file

@ -657,6 +657,9 @@ no limit
##### needs translation #####
Demofile: %s
==
Play background music
==
@ -666,5 +669,8 @@ Spectate next
Spectate previous
==
Strict gametype filter
==
##### old translations #####

View file

@ -657,6 +657,9 @@ no limit
##### needs translation #####
Demofile: %s
==
Play background music
==
@ -666,5 +669,8 @@ Spectate next
Spectate previous
==
Strict gametype filter
==
##### old translations #####

View file

@ -145,6 +145,9 @@ Delete demo
Demo details
== Aufnahmendetails:
Demofile: %s
== Demodatei: %s
Demos
== Aufnahm.
@ -388,6 +391,9 @@ Pistol
Play
== Abspielen
Play background music
== Hintergrundmusik abspielen
Player
== Spieler
@ -538,6 +544,12 @@ Sound volume
Spectate
== Zuschauen
Spectate next
== Nächstem zusehen
Spectate previous
== Vorherigem zusehen
Spectator mode
== Zuschaueroptionen
@ -553,6 +565,9 @@ Standard map
Stop record
== Aufnahme be.
Strict gametype filter
== Genauer Spieltyp
Sudden Death
== Sudden Death
@ -578,7 +593,7 @@ The server is running a non-standard tuning on a pure game type.
== Der Server läuft nicht mit Standardeinstellungen.
There's an unsaved map in the editor, you might want to save it before you quit the game.
== Im Editor ist noch eine ungespeicherte Karte.
== Im Editor ist noch eine ungespeicherte Karte. Vielleicht möchtest du sie speichern.
Time limit
== Zeitlimit
@ -657,14 +672,5 @@ no limit
##### needs translation #####
Play background music
==
Spectate next
==
Spectate previous
==
##### old translations #####

View file

@ -55,5 +55,8 @@ spanish
swedish
== Svenska
turkish
== Türkçe
ukrainian
== Українська

View file

@ -1,30 +1,45 @@
##### translated strings #####
%d Bytes
== %d Bytes
%d of %d servers, %d players
== %d di %d server, %d giocatori
== %d di %d servers, %d giocatori
%d%% loaded
== %d%% caricati
== %d%% caricato
%ds left
== %ds ancora
== %ds rimanenti
%i minute left
== %i minuto ancora
== %i minuto residuo
%i minutes left
== %i minuti ancora
== %i minuti residui
%i second left
== %i secondo ancora
== %i secondo residuo
%i seconds left
== %i secondi ancora
== %i secondi residui
%s wins!
== %s vittorie!
-Page %d-
== -Pagina %d-
Abort
== Annulla
Add
== Aggiungi
Add Friend
== Aggiungi Amico
Address
== Indirizzo
@ -35,25 +50,28 @@ Alpha
== Alpha
Always show name plates
== Mostra sempre etichette dei nomi
== Mostra sempre nomi
Are you sure that you want to delete the demo?
== Sicuro di voler cancellare questa registrazione?
== Sicuro di voler eliminare la demo?
Are you sure that you want to quit?
== Sicuro di voler uscire?
Are you sure that you want to remove the player from your friends list?
== Sicuro di voler rimuovere il giocatore dalla lista degli amici?
As this is the first time you launch the game, please enter your nick name below. It's recommended that you check the settings to adjust them to your liking before joining a server.
== E' la prima volta che avvii il gioco, ti preghiamo di inserire il tuo nickname. E' consigliato aggiustare le impostazioni in base alle proprie preferenze prima di entrare in un server.
== E' la prima volta che avvii il gioco, inserisci il tuo nickname. E' bene che tu controlli le opzioni prima di giocare per avere una migliore esperienza di gioco.
Automatically record demos
== Registra demo automaticamente
== Registra automaticamente demo
Automatically take game over screenshot
== Foto automatica a fine partita
== Cattura automaticamente la schermata 'game over'
Blue team
== Squadra Blu
== Squadra blu
Blue team wins!
== La squadra blu ha vinto!
@ -62,11 +80,20 @@ Body
== Corpo
Call vote
== Inizia voto
== Chiama voto
Change settings
== Cambia configurazione
Chat
== Chat
Clan
== Clan
Client
== Client
Close
== Chiudi
@ -80,7 +107,7 @@ Connecting to
== Connessione a
Connection Problems...
== Connessione Persa...
== Problemi di connessione...
Console
== Console
@ -88,6 +115,18 @@ Console
Controls
== Controlli
Count players only
== Conta solo giocatori
Country
== Paese
Crc:
== Crc:
Created:
== Creato:
Current
== Attuale
@ -98,10 +137,13 @@ Custom colors
== Colori personalizzati
Delete
== Cancella
== Elimina
Delete demo
== Cancella demo
== Elimina demo
Demo details
== Dettagli demo
Demos
== Demo
@ -113,19 +155,19 @@ Disconnected
== Disconnesso
Display Modes
== Tipo di visualizzazione
== Modalità Display
Downloading map
== Scaricando la mappa
== Scaricamento mappa
Draw!
== Pareggio!
== Patta!
Dynamic Camera
== Visuale dinamica
== Camera dinamica
Emoticon
== Emozioni
== Emoticon
Enter
== Entra
@ -134,10 +176,10 @@ Error
== Errore
Error loading demo
== Impossibile caricare la demo
== Errore caricamento demo
FSAA samples
== Esempi FSAA
== Campioni FSAA
Favorite
== Preferito
@ -160,29 +202,35 @@ Folder
Force vote
== Forza voto
Free-View
== Camera libera
Friends
== Amici
Fullscreen
== Schermo intero
== A tutto schermo
Game
== Gioco
== Partita
Game info
== Dettagli gioco
== Informazioni partita
Game over
== Game over
== Fine partita
Game type
== Tipo di gioco
== Modalità di gioco
Game types:
== Tipi di gioco:
== Modalità di gioco:
General
== Generale
Graphics
== Grafica
== Gráfica
Grenade
== Granata
@ -191,22 +239,22 @@ Hammer
== Martello
Has people playing
== Ha gente in gioco
== Contiene giocatori
High Detail
== Molti dettagli
== Alta Risoluzione
Hook
== Rampino
Host address
== Indirizzo host
== Indirizzo Host
Hue
== Col.
== Tinta
Info
== Info
== Informazioni
Internet
== Internet
@ -215,35 +263,50 @@ Invalid Demo
== Demo non valida
Join blue
== Entra blu
== Unisciti ai blu
Join game
== Entra
== Unisciti alla partita
Join red
== Entra rosso
== Unisciti ai rossi
Jump
== Salta
Kick player
== Espelli giocatore
LAN
== LAN
Language
== Lingua
Length:
== Lunghezza:
Lht.
== Lum.
== Luminosità
Loading
== Caricamento
MOTD
== MDG
== MOTD
Map
== Mappa
Map:
== Mappa:
Max Screenshots
== Screenshot Massimi
Max demos
== Demo massime
Maximum ping:
== Ping massimo:
@ -251,31 +314,40 @@ Miscellaneous
== Altro
Mouse sens.
== Sensibilità
== Sensività del mouse
Move left
== Muovi a sinistra
== Sinistra
Move player to spectators
== Muovi giocatore tra gli spettatori
Move right
== Muovi a destra
== Destra
Movement
== Movimento
Mute when not active
== Muto quando inattivo
== Silenzioso se inattivo
Name
== Nome
Name plates size
== Dimensione etichetta
== Lunghezza nomi
Netversion:
== Versione net
New name:
== Nuovo nome:
News
== Notizie
Next weapon
== Successiva
== Prossima arma
Nickname
== Nickname
@ -290,7 +362,7 @@ No servers found
== Nessun server trovato
No servers match your filter criteria
== Nessun server corrisponde ai filtri di ricerca
== Nessun server rispecchia i tuoi criteri
Ok
== Ok
@ -299,7 +371,7 @@ Open
== Apri
Parent Folder
== Indietro
== Cartella superiore
Password
== Password
@ -314,22 +386,25 @@ Pistol
== Pistola
Play
== Guarda
== Gioca
Player
== Giocatore
Player options
== Opzioni giocatore
Players
== Giocatori
Please balance teams!
== Squadre sbilanciate!
== Bilancia le squadre!
Prev. weapon
== Precedente
== Arma precedente
Quality Textures
== Textures di qualità
== Qualità Textures
Quick search:
== Ricerca rapida:
@ -337,6 +412,12 @@ Quick search:
Quit
== Esci
Quit anyway?
== Vuoi uscire comunque?
REC %3d:%02d
== REC %3d:%02d
Reason:
== Motivo:
@ -347,100 +428,136 @@ Red team
== Squadra rossa
Red team wins!
== La squadra rossa ha vinto!
== La squadra rossa vince!
Refresh
== Aggiorna
Refreshing master servers
== Aggiornando la lista server
== Aggiornamento server principali
Remote console
== Console remota
Remove
== Rimuovi
Remove friend
== Rimuovi amico
Rename
== Renomina
Rename demo
== Rinomina demo
Reset filter
== Annulla filtri
== Azzera filtri
Reset to defaults
== Reimposta
== Ripristina impostazioni iniziali
Rifle
== Laser
== Mitra
Round
== Turno
== Round
Sample rate
== Frequenza
== Frequenza di campionamento
Sat.
== Sat.
Score
== Punti
== Punteggi
Score board
== Scoreboard
== Tabella dei Punteggi
Score limit
== Punteggio massimo
== Punteggio Max.
Scoreboard
== Scoreboard
== Tabella dei Punteggi
Screenshot
== Screenshot
== Schermata
Server address:
== Indirizzo server:
Server details
== Dettagli del server
== Dettagli server
Server filter
== Filtri server
Server info
== Dettagli
== Info server
Server not full
== Server non pieno
Settings
== Impostazioni
== Configurazioni
Shotgun
== Fucile
Show chat
== Mostra Chat
== Mostra chat
Show friends
== Mostra amici
Show ingame HUD
== Mostra HUD in gioco
Show name plates
== Mostra etichetta nomi
== Mostra nomi
Show only supported
== Mostra solo supportati
Size:
== Dimensioni:
Skins
== Skins
Sound
== Suono
Sound error
== Suono errore
Sound volume
== Volume
== Volume suono
Spectate
== Osserva
== Spettatore
Spectator mode
== Modalità spettatore
Spectators
== Spettatori
Standard gametype
== Tipo di gioco classico
== Tipo di gioco standard
Standard map
== Mappa classica
== Mappa standard
Stop record
== Termina reg.
== Ferma registrazione
Sudden Death
== Morte istantanea
Switch weapon on pickup
== Cambia arma alla raccolta
== Cambia arma automaticamente
Team
== Squadra
@ -449,37 +566,49 @@ Team chat
== Chat di squadra
Teeworlds %s is out! Download it at www.teeworlds.com!
== E' uscito Teeworlds %s! Scaricalo da www.teeworlds.com !
== Teeworlds %s e' stato rilasciato! Scaricalo da www.teeworlds.com!
Texture Compression
== Compressione Texture
== Compressione textures
The audio device couldn't be initialised.
== Il dispositivo audio non può essere inizializzato.
The server is running a non-standard tuning on a pure game type.
== Il server sta eseguendo un tuning non-standard su un tipo di gioco classico.
== Il server è attivo con una configurazione non standard in una modalità di gioco pura.
There's an unsaved map in the editor, you might want to save it before you quit the game.
== C'è una mappa non salvata nell'editor, sicuramente vorrai salvarla prima di uscire.
Time limit
== Limite di tempo
== Limite tempo.
Time limit: %d min
== Tempo limite %d min
== Limite tempo: %d min
Try again
== Ritenta
== Riprova
Type
== Tipo
== Tipologia
Type:
== Tipologia:
UI Color
== Colore del menu
== Colore UI
Unable to delete the demo
== Impossibile eliminare la registrazione
== Impossibile eliminare la demo
Unable to rename the demo
== Impossibile rinominare la demo
Use sounds
== Usa suoni
== Attiva suoni
Use team colors for name plates
== Utilizza i colori del team per i nomi
V-Sync
== V-Sync
@ -487,6 +616,15 @@ V-Sync
Version
== Versione
Version:
== Versione:
Vote command:
== Comando voto:
Vote description:
== Descrizione voto:
Vote no
== Vota no
@ -494,10 +632,13 @@ Vote yes
== Vota si
Voting
== Votazione
== Votazione in corso
Warmup
== Riscaldamento
Weapon
== Attiva arma
== Arma
Welcome to Teeworlds
== Benvenuto su Teeworlds!
@ -506,164 +647,29 @@ Yes
== Si
You must restart the game for all settings to take effect.
== E' necessario riavviare il gioco per rendere effettive le modifiche.
== E' necessario riavviare il gioco per impostare i cambiamenti.
Your skin
== La tua Skin
== Tua skin
no limit
== senza limite
== senza limiti
##### needs translation #####
%d Bytes
==
%s wins!
==
-Page %d-
==
Add
==
Add Friend
==
Are you sure that you want to remove the player from your friends list?
==
Change settings
==
Clan
==
Client
==
Count players only
==
Country
==
Crc:
==
Created:
==
Demo details
==
Free-View
==
Friends
==
Kick player
==
Length:
==
Map:
==
Max Screenshots
==
Max demos
==
Move player to spectators
==
Netversion:
==
New name:
Demofile: %s
==
Play background music
==
Player options
==
Quit anyway?
==
REC %3d:%02d
==
Remove
==
Remove friend
==
Rename
==
Rename demo
==
Server address:
==
Server filter
==
Show friends
==
Show ingame HUD
==
Size:
==
Sound error
==
Spectate next
==
Spectate previous
==
Spectator mode
==
Sudden Death
==
There's an unsaved map in the editor, you might want to save it before you quit the game.
==
Type:
==
Unable to rename the demo
==
Use team colors for name plates
==
Version:
==
Vote command:
==
Vote description:
==
Warmup
Strict gametype filter
==
##### old translations #####

View file

@ -657,6 +657,9 @@ no limit
##### needs translation #####
Demofile: %s
==
Play background music
==
@ -666,5 +669,8 @@ Spectate next
Spectate previous
==
Strict gametype filter
==
##### old translations #####

View file

@ -531,6 +531,9 @@ Delete demo
Demo details
==
Demofile: %s
==
Folder
==
@ -633,6 +636,9 @@ Spectator mode
Stop record
==
Strict gametype filter
==
The audio device couldn't be initialised.
==

View file

@ -1,4 +1,4 @@

##### translated strings #####
%d Bytes
@ -61,6 +61,9 @@ Are you sure that you want to quit?
Are you sure that you want to remove the player from your friends list?
== Tem certeza que deseja remover o jogador da sua lista de amigos?
As this is the first time you launch the game, please enter your nick name below. It's recommended that you check the settings to adjust them to your liking before joining a server.
== Como esta é a primeira vez que você abre o jogo, por favor, coloque seu apelido abaixo. É recomendado que você verifique as configurações e então ajuste-as para suas preferências antes de entrar em um servidor.
Automatically record demos
== Gravar demos automaticamente
@ -142,6 +145,9 @@ Delete demo
Demo details
== Detalhes do demo
Demofile: %s
== Demo: %s
Demos
== Demos
@ -385,6 +391,9 @@ Pistol
Play
== Assistir
Play background music
== Tocar música de fundo
Player
== Jogador
@ -482,7 +491,7 @@ Screenshot
== Captura de tela
Server address:
== Endereço do server:
== End. do servidor:
Server details
== Detalhes do server
@ -535,6 +544,12 @@ Sound volume
Spectate
== Observar
Spectate next
== Observar próximo
Spectate previous
== Observar anterior
Spectator mode
== Modo Observador
@ -550,6 +565,9 @@ Standard map
Stop record
== Parar de gravar
Strict gametype filter
== Tipo de jogo exato
Sudden Death
== Morte Súbita
@ -654,17 +672,9 @@ no limit
##### needs translation #####
As this is the first time you launch the game, please enter your nick name below. It's recommended that you check the settings to adjust them to your liking before joining a server.
==
Play background music
==
Spectate next
==
Spectate previous
==
##### old translations #####

== ## translated strings #####

View file

@ -657,6 +657,9 @@ no limit
##### needs translation #####
Demofile: %s
==
Play background music
==
@ -666,5 +669,8 @@ Spectate next
Spectate previous
==
Strict gametype filter
==
##### old translations #####

View file

@ -388,6 +388,9 @@ Pistol
Play
== Воспроизвести
Play background music
== Воспроизвести фоновую музыку
Player
== Игрок
@ -398,7 +401,7 @@ Players
== Игроки
Please balance teams!
== Пожалуйста отбалансируйте команды!
== Пожалуйста cбалансируйте команды!
Prev. weapon
== Пред. оружие
@ -538,6 +541,12 @@ Sound volume
Spectate
== Наблюдать
Spectate next
== Наблюдать следующего
Spectate previous
== Наблюдать предыдущего
Spectator mode
== Наблюдатель
@ -657,13 +666,10 @@ no limit
##### needs translation #####
Play background music
Demofile: %s
==
Spectate next
==
Spectate previous
Strict gametype filter
==
##### old translations #####

View file

@ -528,6 +528,9 @@ Delete demo
Demo details
==
Demofile: %s
==
Folder
==
@ -633,6 +636,9 @@ Spectator mode
Stop record
==
Strict gametype filter
==
The audio device couldn't be initialised.
==

View file

@ -657,6 +657,9 @@ no limit
##### needs translation #####
Demofile: %s
==
Play background music
==
@ -666,5 +669,8 @@ Spectate next
Spectate previous
==
Strict gametype filter
==
##### old translations #####

View file

@ -657,6 +657,9 @@ no limit
##### needs translation #####
Demofile: %s
==
Play background music
==
@ -666,6 +669,9 @@ Spectate next
Spectate previous
==
Strict gametype filter
==
##### old translations #####
Page %d of %d

View file

@ -657,6 +657,9 @@ no limit
##### needs translation #####
Demofile: %s
==
Play background music
==
@ -666,5 +669,8 @@ Spectate next
Spectate previous
==
Strict gametype filter
==
##### old translations #####

676
data/languages/turkish.txt Normal file
View file

@ -0,0 +1,676 @@
##### translated strings #####
%d Bytes
== %d Bayt
%d of %d servers, %d players
== %d/%d sunucu, %d oyuncu
%d%% loaded
== %d%% yüklendi
%ds left
== %ds kaldı
%i minute left
== %i dakika kaldı
%i minutes left
== %i dakika kaldı
%i second left
== %i saniye kaldı
%i seconds left
== %i saniye kaldı
%s wins!
== %s kazandı!
-Page %d-
== -Page %d-
Abort
== İptal
Add
== Ekle
Add Friend
== Arkadaş Ekle
Address
== Adres
All
== Hepsi
Alpha
== Alfa
Always show name plates
== İsim etiketlerini herzaman göster
Are you sure that you want to delete the demo?
== Bu demo dosyasını silmek istediğinize eminmisiniz?
Are you sure that you want to quit?
== Çıkmak istediğinize eminmisiniz?
Are you sure that you want to remove the player from your friends list?
== Bu oyuncuyu arkadaş listenizden kaldırmak istediğinize emin misiniz?
As this is the first time you launch the game, please enter your nick name below. It's recommended that you check the settings to adjust them to your liking before joining a server.
== Oyunu ilk açışınız olduğundan takma adınızı giriniz. Bir oyuna katılmadan evvel ayarlara bakmanız ve isteğinize göre özelleştirmeniz önerilir.
Automatically record demos
== Otomatik olarak demo kaydet
Automatically take game over screenshot
== Otomatik olarak oyun bitişinde ekran görüntüsü al
Blue team
== Mavi takım
Blue team wins!
== Mavi takım kazandı!
Body
== Gövde
Call vote
== Oylama başlat
Change settings
== Ayarları değiştir
Chat
== Chat
Clan
== Clan
Client
== İstemci
Close
== Kapa
Compatible version
== Uyumlu versiyon
Connect
== Bağlan
Connecting to
== Bağlanılıyor
Connection Problems...
== Bağlantı Hatası...
Console
== Konsol
Controls
== Kontroller
Count players only
== Sadece oyuncuları say
Country
== Ülke
Crc:
== Crc :
Created:
== Hazırlandı :
Current
== Şimdiki
Current version: %s
== Mevcut versyon : %s
Custom colors
== Özel renkler
Delete
== Sil
Delete demo
== Demoyu sil
Demo details
== Demo ayrıntıları
Demos
== Demolar
Disconnect
== Bağlantıyı kes
Disconnected
== Bağlantı kesildi
Display Modes
== Çözünürlük
Downloading map
== Harita yükleniyor
Draw!
== Berabere!
Dynamic Camera
== Dinamik kamera
Emoticon
== Yüz ifadesi
Enter
== Gir
Error
== Hata
Error loading demo
== Demo yüklenirken hata oluştu
FSAA samples
== FSAA örnekleri
Favorite
== Favori
Favorites
== Favoriler
Feet
== Ayak
Filter
== Filtre
Fire
== Ateş
Folder
== Dosya
Force vote
== Oylamayı zorla
Free-View
== Serbest Görüntü
Friends
== Arkadaşlar
Fullscreen
== Tam ekran
Game
== Oyun
Game info
== Oyun bilgisi
Game over
== Oyun sonu
Game type
== Oyun türü
Game types:
== Oyun türü:
General
== Genel
Graphics
== Grafik
Grenade
== El bombası
Hammer
== Çekiç
Has people playing
== Oynayan insan bulunduran
High Detail
== High Detail
Hook
== Kanca
Host address
== Sunucu adresi
Hue
== Renk
Info
== Bilgi
Internet
== Internet
Invalid Demo
== Geçersiz Demo
Join blue
== Maviye katıl
Join game
== Oyuna katıl
Join red
== Kırmızıya katıl
Jump
== Zıpla
Kick player
== Oyuncuyu At
LAN
== LAN
Language
== Dil
Length:
== Uzunluk:
Lht.
== Parlaklık
Loading
== Yükleniyor
MOTD
== MOTD
Map
== Harita
Map:
== Harita:
Max Screenshots
== Maksimum Ekran Alıntısı
Max demos
== Maksimum Demo
Maximum ping:
== Maximum ping
Miscellaneous
== Çeşitli
Mouse sens.
== Mouse duyarlılığı
Move left
== Sola git
Move player to spectators
== Seyircilere katıl
Move right
== Sağa git
Movement
== Hareket
Mute when not active
== Aktif değilken sessizleştir
Name
== İsim
Name plates size
== Boyut
Netversion:
== Netversion :
New name:
== Yeni isim :
News
== Haberler
Next weapon
== Sonraki silah
Nickname
== Takma ad
No
== Hayır
No password
== Şifresiz
No servers found
== Sunucu bulunamadı
No servers match your filter criteria
== Filtre kriterlerinize uygun sunucu bulunamadı
Ok
== Ok
Open
== Aç
Parent Folder
== Üst dizin
Password
== Şifre
Password incorrect
== Hatalı şifre
Ping
== Ping
Pistol
== Tabanca
Play
== Oynat
Player
== Oyuncu
Player options
== Oyuncu ayarları
Players
== Oyuncular
Please balance teams!
== Takımları dengeleyin!
Prev. weapon
== Önceki silah
Quality Textures
== Kaliteli dolgular
Quick search:
== Hızlı Arama :
Quit
== Çıkmak
Quit anyway?
== Çıkmak istediğinize emin misiniz?
REC %3d:%02d
== REC %3d:%02d
Reason:
== Neden :
Record demo
== Demo kaydet
Red team
== Kırmızı takım
Red team wins!
== Kırmızı takım kazandı!
Refresh
== Yenile
Refreshing master servers
== Ana sunucu yenileniyor
Remote console
== Uzak Konsol
Remove
== Çıkar
Remove friend
== Arkadaşı sil
Rename
== Yeniden isimlendir
Rename demo
== Demonun adını değiştir
Reset filter
== Filitreleri varsayılanlara getir
Reset to defaults
== Réinitialiser
Rifle
== Laser
Round
== Round
Sample rate
== Sample rate
Sat.
== Doygunluk
Score
== Skor
Score board
== Skor tahtası
Score limit
== Skor limiti
Scoreboard
== Skor tahtası
Screenshot
== Ekran alıntısı
Server address:
== Sunucu adresi :
Server details
== Sunucucu detayları
Server filter
== Filtreler
Server info
== Sunucu bilgisi
Server not full
== Sunucu dolu değil
Settings
== Ayarlar
Shotgun
== Tüfek
Show chat
== Sohbeti göster
Show friends
== Arkadaşları göster
Show ingame HUD
== Oyun içi HUD ı göster
Show name plates
== İsim etiketlerini göster
Show only supported
== Desteklenmeyen çözünürlükleri gizle
Size:
== Boyut:
Skins
== Skins
Sound
== Ses
Sound error
== Ses hatası
Sound volume
== Ses yüksekliği
Spectate
== İzle
Spectator mode
== İzleyici modu
Spectators
== İzleyiciler
Standard gametype
== Standart oyun türleri
Standard map
== Standart haritalar
Stop record
== Kaydı durdur
Sudden Death
== Ani ölüm
Switch weapon on pickup
== Silah alındığıda yeni silaha geç
Team
== Takım
Team chat
== Takım sohbeti
Teeworlds %s is out! Download it at www.teeworlds.com!
== Teeworlds %s çıktı! www.teeworlds.com dan indirin!
Texture Compression
== Dolgu sıkıştırması
The audio device couldn't be initialised.
== Ses donanımı başlatılamadı.
The server is running a non-standard tuning on a pure game type.
== Bu sunucu standart olmayan bir ayarı saf bir oyun türünde kullanıyor.
There's an unsaved map in the editor, you might want to save it before you quit the game.
== Editörde kaydedilmemiş bir harita var, kapatmadan evvel kaydetmek isteyebilirsiniz.
Time limit
== Süre limiti
Time limit: %d min
== Süre limiti: %d min
Try again
== Tekrar dene
Type
== Tür
Type:
== Tür:
UI Color
== Menü rengi
Unable to delete the demo
== Demo silinemiyor
Unable to rename the demo
== Demonun ismi değiştirilemiyor
Use sounds
== Sesleri kullan
Use team colors for name plates
== İsim etiketlerinde takım renklerini kullan
V-Sync
== V-Sync
Version
== Versyon
Version:
== Versyon :
Vote command:
== Komut:
Vote description:
== Açıklama :
Vote no
== Hayır oyu ver
Vote yes
== Evet oyu ver
Voting
== Oylama
Warmup
== Isınma
Weapon
== Silah
Welcome to Teeworlds
== Teeworlds'e hoşgeldin
Yes
== Evet
You must restart the game for all settings to take effect.
== Bütün ayarların aktif olması için oyunu yeniden başlatmalısınız.
Your skin
== Your skin
no limit
== limit yok
##### needs translation #####
Demofile: %s
==
Play background music
==
Spectate next
==
Spectate previous
==
Strict gametype filter
==
##### old translations #####

View file

@ -549,6 +549,9 @@ Delete demo
Demo details
==
Demofile: %s
==
Free-View
==
@ -636,6 +639,9 @@ Spectate previous
Spectator mode
==
Strict gametype filter
==
The audio device couldn't be initialised.
==

Binary file not shown.

Before

Width:  |  Height:  |  Size: 258 KiB

After

Width:  |  Height:  |  Size: 258 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 232 KiB

After

Width:  |  Height:  |  Size: 232 KiB

View file

@ -9,6 +9,7 @@ elif sys.version_info[0] == 3:
match = re.search('(.*)/', sys.argv[0])
if match != None:
os.chdir(match.group(1))
os.chdir('../')
url_bam = "http://github.com/matricks/bam/zipball/master"
url_DDRace = "http://github.com/GreYFoX/DDRace/zipball/master"
@ -77,7 +78,7 @@ else:
print("%s-%s-%s" % (name, version_teeworlds, platform))
root_dir = os.getcwd() + os.sep
work_dir = root_dir + "work"
work_dir = root_dir + "scripts/work"
def fetch_file(url):
try:
@ -129,7 +130,7 @@ def bail(reason):
def clean():
print("*** cleaning ***")
try: shutil.rmtree("work")
try: shutil.rmtree(work_dir)
except: pass
def file_exists(file):
@ -151,7 +152,7 @@ if flag_clean:
clean()
# make dir
try: os.mkdir("work")
try: os.mkdir(work_dir)
except: pass
# change dir

View file

@ -2,9 +2,10 @@ import os, re, sys
match = re.search('(.*)/', sys.argv[0])
if match != None:
os.chdir(match.group(1))
os.chdir('../')
notice = [b"/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */\n", b"/* If you are missing that file, acquire a complete release at teeworlds.com. */\n"]
exclude = ["../src%sengine%sexternal" % (os.sep, os.sep), "../src%sosxlaunch" % os.sep]
exclude = ["src%sengine%sexternal" % (os.sep, os.sep), "src%sosxlaunch" % os.sep]
updated_files = 0
def fix_copyright_notice(filename):
@ -42,7 +43,7 @@ def fix_copyright_notice(filename):
updated_files += 1
skip = False
for root, dirs, files in os.walk("../src"):
for root, dirs, files in os.walk("src"):
for excluding in exclude:
if root[:len(excluding)] == excluding:
skip = True

View file

@ -1,7 +1,8 @@
import os, re, sys
match = re.search("(.*?)/[^/]*?$", sys.argv[0])
match = re.search('(.*)/', sys.argv[0])
if match != None:
os.chdir(os.getcwd() + "/" + match.group(1))
os.chdir(match.group(1))
os.chdir('../')
source_exts = [".c", ".cpp", ".h"]
@ -13,7 +14,7 @@ def parse_source():
stringtable[fields[0]] = ""
process_line(fields[1])
for root, dirs, files in os.walk("../src"):
for root, dirs, files in os.walk("src"):
for name in files:
filename = os.path.join(root, name)
@ -80,11 +81,11 @@ srctable = parse_source()
print("%-40s %8s %8s %8s" % ("filename", "total", "new", "old"))
for filename in os.listdir("../data/languages"):
for filename in os.listdir("data/languages"):
if not ".txt" in filename:
continue
if filename == "index.txt":
continue
filename = "../data/languages/" + filename
filename = "data/languages/" + filename
generate_languagefile(filename, srctable, load_languagefile(filename))

View file

@ -326,9 +326,12 @@ int io_seek(IOHANDLE io, int offset, int origin)
break;
case IOSEEK_END:
real_origin = SEEK_END;
break;
default:
return -1;
}
return fseek((FILE*)io, offset, origin);
return fseek((FILE*)io, offset, real_origin);
}
long int io_tell(IOHANDLE io)
@ -418,6 +421,17 @@ void thread_sleep(int milliseconds)
#endif
}
void thread_detach(void *thread)
{
#if defined(CONF_FAMILY_UNIX)
pthread_detach((pthread_t)(thread));
#elif defined(CONF_FAMILY_WINDOWS)
CloseHandle(thread);
#else
#error not implemented
#endif
}
@ -581,13 +595,23 @@ int net_addr_comp(const NETADDR *a, const NETADDR *b)
void net_addr_str(const NETADDR *addr, char *string, int max_length)
{
if(addr->type == NETTYPE_IPV4)
str_format(string, max_length, "%d.%d.%d.%d:%d", addr->ip[0], addr->ip[1], addr->ip[2], addr->ip[3], addr->port);
{
if(addr->port != 0)
str_format(string, max_length, "%d.%d.%d.%d:%d", addr->ip[0], addr->ip[1], addr->ip[2], addr->ip[3], addr->port);
else
str_format(string, max_length, "%d.%d.%d.%d", addr->ip[0], addr->ip[1], addr->ip[2], addr->ip[3]);
}
else if(addr->type == NETTYPE_IPV6)
{
str_format(string, max_length, "[%x:%x:%x:%x:%x:%x:%x:%x]:%d",
(addr->ip[0]<<8)|addr->ip[1], (addr->ip[2]<<8)|addr->ip[3], (addr->ip[4]<<8)|addr->ip[5], (addr->ip[6]<<8)|addr->ip[7],
(addr->ip[8]<<8)|addr->ip[9], (addr->ip[10]<<8)|addr->ip[11], (addr->ip[12]<<8)|addr->ip[13], (addr->ip[14]<<8)|addr->ip[15],
addr->port);
if(addr->port != 0)
str_format(string, max_length, "[%x:%x:%x:%x:%x:%x:%x:%x]:%d",
(addr->ip[0]<<8)|addr->ip[1], (addr->ip[2]<<8)|addr->ip[3], (addr->ip[4]<<8)|addr->ip[5], (addr->ip[6]<<8)|addr->ip[7],
(addr->ip[8]<<8)|addr->ip[9], (addr->ip[10]<<8)|addr->ip[11], (addr->ip[12]<<8)|addr->ip[13], (addr->ip[14]<<8)|addr->ip[15],
addr->port);
else
str_format(string, max_length, "[%x:%x:%x:%x:%x:%x:%x:%x]",
(addr->ip[0]<<8)|addr->ip[1], (addr->ip[2]<<8)|addr->ip[3], (addr->ip[4]<<8)|addr->ip[5], (addr->ip[6]<<8)|addr->ip[7],
(addr->ip[8]<<8)|addr->ip[9], (addr->ip[10]<<8)|addr->ip[11], (addr->ip[12]<<8)|addr->ip[13], (addr->ip[14]<<8)|addr->ip[15]);
}
else
str_format(string, max_length, "unknown type %d", addr->type);

View file

@ -367,6 +367,16 @@ void thread_destroy(void *thread);
*/
void thread_yield();
/*
Function: thread_detach
Puts the thread in the detached thread, guaranteeing that
resources of the thread will be freed immediately when the
thread terminates.
Parameters:
thread - Thread to detach
*/
void thread_detach(void *thread);
/* Group: Locks */
typedef void* LOCK;

View file

@ -1721,7 +1721,6 @@ void CClient::Update()
int64 PrevtickStart = (m_aSnapshots[SNAP_PREV]->m_Tick)*time_freq()/50;
int PrevPredTick = (int)(PredNow*50/time_freq());
int NewPredTick = PrevPredTick+1;
static float LastPredintra = 0;
m_GameIntraTick = (Now - PrevtickStart) / (float)(CurtickStart-PrevtickStart);
m_GameTickTime = (Now - PrevtickStart) / (float)Freq; //(float)SERVER_TICK_SPEED);
@ -1738,15 +1737,12 @@ void CClient::Update()
if(NewPredTick > m_PredTick)
{
LastPredintra = m_PredIntraTick;
m_PredTick = NewPredTick;
Repredict = 1;
// send input
SendInput();
}
LastPredintra = m_PredIntraTick;
}
// only do sane predictions

View file

@ -196,7 +196,9 @@ void CServerBrowser::Filter()
Filtered = 1;
else if(g_Config.m_BrFilterServerAddress[0] && !str_find_nocase(m_ppServerlist[i]->m_Info.m_aAddress, g_Config.m_BrFilterServerAddress))
Filtered = 1;
else if(g_Config.m_BrFilterGametype[0] && !str_find_nocase(m_ppServerlist[i]->m_Info.m_aGameType, g_Config.m_BrFilterGametype))
else if(g_Config.m_BrFilterGametypeStrict && g_Config.m_BrFilterGametype[0] && str_comp_nocase(m_ppServerlist[i]->m_Info.m_aGameType, g_Config.m_BrFilterGametype))
Filtered = 1;
else if(!g_Config.m_BrFilterGametypeStrict && g_Config.m_BrFilterGametype[0] && !str_find_nocase(m_ppServerlist[i]->m_Info.m_aGameType, g_Config.m_BrFilterGametype))
Filtered = 1;
else if(g_Config.m_BrFilterString[0] != 0)
{
@ -252,6 +254,7 @@ int CServerBrowser::SortHash() const
i |= g_Config.m_BrFilterCompatversion<<10;
i |= g_Config.m_BrFilterPure<<11;
i |= g_Config.m_BrFilterPureMap<<12;
i |= g_Config.m_BrFilterGametypeStrict<<13;
i |= g_Config.m_BrFilterPing<<18;
return i;
}

View file

@ -570,7 +570,6 @@ public:
float DrawX = 0.0f, DrawY = 0.0f;
int LineCount = 0;
float CursorX, CursorY;
const char *pEnd;
float Size = pCursor->m_FontSize;
@ -605,8 +604,6 @@ public:
if(Length < 0)
Length = str_length(pText);
pEnd = pText + Length;
// if we don't want to render, we can just skip the first outline pass
i = 1;
if(pCursor->m_Flags&TEXTFLAG_RENDER)

View file

@ -113,7 +113,7 @@ int png_init(png_alloc_t pngalloc, png_free_t pngfree)
if(pngalloc)
png_alloc = pngalloc;
else
png_alloc = &malloc;
png_alloc = (png_alloc_t)&malloc;
if(pngfree)
png_free = pngfree;
@ -492,7 +492,7 @@ static int png_write_idats(png_t* png, unsigned char* data)
(void)png_end_deflate;
(void)png_deflate;
chunk = png_alloc(size);
chunk = png_alloc(size+8);
memcpy(chunk, "IDAT", 4);
written = size;

View file

@ -73,7 +73,7 @@ enum
typedef unsigned (*png_write_callback_t)(void* input, unsigned long size, unsigned long numel, void* user_pointer);
typedef unsigned (*png_read_callback_t)(void* output, unsigned long size, unsigned long numel, void* user_pointer);
typedef void (*png_free_t)(void* p);
typedef void * (*png_alloc_t)(size_t s);
typedef void * (*png_alloc_t)(unsigned long s);
typedef struct
{

View file

@ -31,7 +31,6 @@ public:
virtual bool ClientIngame(int ClientID) = 0;
virtual int GetClientInfo(int ClientID, CClientInfo *pInfo) = 0;
virtual void GetClientAddr(int ClientID, char *pAddrStr, int Size) = 0;
virtual int *LatestInput(int ClientID, int *pSize) = 0;
virtual int SendMsg(CMsgPacker *pMsg, int Flags, int ClientID) = 0;

View file

@ -34,20 +34,20 @@ class CRegister
int m_RegisterFirst;
int m_RegisterCount;
class CMasterserverInfo m_aMasterserverInfo[IMasterServer::MAX_MASTERSERVERS];
CMasterserverInfo m_aMasterserverInfo[IMasterServer::MAX_MASTERSERVERS];
int m_RegisterRegisteredServer;
void RegisterNewState(int State);
void RegisterSendFwcheckresponse(NETADDR *pAddr);
void RegisterSendHeartbeat(NETADDR Addr);
void RegisterSendCountRequest(NETADDR Addr);
void RegisterGotCount(class CNetChunk *pChunk);
void RegisterGotCount(struct CNetChunk *pChunk);
public:
CRegister();
void Init(class CNetServer *pNetServer, class IEngineMasterServer *pMasterServer, class IConsole *pConsole);
void RegisterUpdate(int Nettype);
int RegisterProcessPacket(class CNetChunk *pPacket);
int RegisterProcessPacket(struct CNetChunk *pPacket);
};
#endif

View file

@ -358,21 +358,14 @@ void CServer::GetClientAddr(int ClientID, char *pAddrStr, int Size)
}
int *CServer::LatestInput(int ClientID, int *size)
{
if(ClientID < 0 || ClientID >= MAX_CLIENTS || m_aClients[ClientID].m_State < CServer::CClient::STATE_READY)
return 0;
return m_aClients[ClientID].m_LatestInput.m_aData;
}
const char *CServer::ClientName(int ClientID)
{
if(ClientID < 0 || ClientID >= MAX_CLIENTS || m_aClients[ClientID].m_State == CServer::CClient::STATE_EMPTY)
return "(invalid client)";
return "(invalid)";
if(m_aClients[ClientID].m_State == CServer::CClient::STATE_INGAME)
return m_aClients[ClientID].m_aName;
else
return "(connecting client)";
return "(connecting)";
}

View file

@ -162,8 +162,6 @@ public:
int ClientCountry(int ClientID);
bool ClientIngame(int ClientID);
int *LatestInput(int ClientID, int *size);
virtual int SendMsg(CMsgPacker *pMsg, int Flags, int ClientID);
int SendMsgEx(CMsgPacker *pMsg, int Flags, int ClientID, bool System);

View file

@ -35,6 +35,7 @@ MACRO_CONFIG_INT(BrFilterFriends, br_filter_friends, 0, 0, 1, CFGFLAG_SAVE|CFGFL
MACRO_CONFIG_INT(BrFilterPw, br_filter_pw, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Filter out password protected servers in browser", IConsole::CONSOLELEVEL_USER)
MACRO_CONFIG_INT(BrFilterPing, br_filter_ping, 999, 0, 999, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Ping to filter by in the server browser", IConsole::CONSOLELEVEL_USER)
MACRO_CONFIG_STR(BrFilterGametype, br_filter_gametype, 128, "", CFGFLAG_SAVE|CFGFLAG_CLIENT, "Game types to filter", IConsole::CONSOLELEVEL_USER)
MACRO_CONFIG_INT(BrFilterGametypeStrict, br_filter_gametype_strict, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Strict gametype filter", IConsole::CONSOLELEVEL_USER)
MACRO_CONFIG_STR(BrFilterServerAddress, br_filter_serveraddress, 128, "", CFGFLAG_SAVE|CFGFLAG_CLIENT, "Server address to filter", IConsole::CONSOLELEVEL_USER)
MACRO_CONFIG_INT(BrFilterPure, br_filter_pure, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Filter out non-standard servers in browser", IConsole::CONSOLELEVEL_USER)
MACRO_CONFIG_INT(BrFilterPureMap, br_filter_pure_map, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Filter out non-standard maps in browser", IConsole::CONSOLELEVEL_USER)

View file

@ -38,7 +38,7 @@ class CConsole : public IConsole
{
public:
const char *m_pFilename;
struct CExecFile *m_pPrev;
CExecFile *m_pPrev;
};
CExecFile *m_pFirstExec;

View file

@ -273,7 +273,9 @@ void *CDataFileReader::GetDataImpl(int Index, int Swap)
{
// fetch the data size
int DataSize = GetDataSize(Index);
#if defined(CONF_ARCH_ENDIAN_BIG)
int SwapSize = DataSize;
#endif
if(m_pDataFile->m_Header.m_Version == 4)
{
@ -292,7 +294,9 @@ void *CDataFileReader::GetDataImpl(int Index, int Swap)
// decompress the data, TODO: check for errors
s = UncompressedSize;
uncompress((Bytef*)m_pDataFile->m_ppDataPtrs[Index], &s, (Bytef*)pTemp, DataSize); // ignore_convention
#if defined(CONF_ARCH_ENDIAN_BIG)
SwapSize = s;
#endif
// clean up the temporary buffers
mem_free(pTemp);

View file

@ -6,7 +6,7 @@
// raw datafile access
class CDataFileReader
{
class CDatafile *m_pDataFile;
struct CDatafile *m_pDataFile;
void *GetDataImpl(int Index, int Swap);
public:
CDataFileReader() : m_pDataFile(0) {}

View file

@ -57,8 +57,8 @@ void CHuffman::ConstructTree(const unsigned *pFrequencies)
{
m_aNodes[i].m_NumBits = 0xFFFFFFFF;
m_aNodes[i].m_Symbol = i;
m_aNodes[i].m_aLeafs[0] = -1;
m_aNodes[i].m_aLeafs[1] = -1;
m_aNodes[i].m_aLeafs[0] = 0xffff;
m_aNodes[i].m_aLeafs[1] = 0xffff;
if(i == HUFFMAN_EOF_SYMBOL)
aNodesLeftStorage[i].m_Frequency = 1;

View file

@ -30,7 +30,7 @@ class CMapChecker
public:
CMapChecker();
void AddMaplist(class CMapVersion *pMaplist, int Num);
void AddMaplist(struct CMapVersion *pMaplist, int Num);
bool IsMapValid(const char *pMapName, unsigned MapCrc, unsigned MapSize);
bool ReadAndValidateMap(class IStorage *pStorage, const char *pFilename, int StorageType);
};

View file

@ -192,7 +192,7 @@ public:
int AckSequence() const { return m_Ack; }
};
struct CNetRecvUnpacker
class CNetRecvUnpacker
{
public:
bool m_Valid;
@ -222,13 +222,13 @@ public:
};
private:
class CSlot
struct CSlot
{
public:
CNetConnection m_Connection;
};
class CBan
struct CBan
{
public:
CBanInfo m_Info;

View file

@ -81,9 +81,9 @@ int CNetServer::Close()
int CNetServer::Drop(int ClientID, const char *pReason)
{
// TODO: insert lots of checks here
NETADDR Addr = ClientAddr(ClientID);
/*NETADDR Addr = ClientAddr(ClientID);
/*dbg_msg("net_server", "client dropped. cid=%d ip=%d.%d.%d.%d reason=\"%s\"",
dbg_msg("net_server", "client dropped. cid=%d ip=%d.%d.%d.%d reason=\"%s\"",
ClientID,
Addr.ip[0], Addr.ip[1], Addr.ip[2], Addr.ip[3],
pReason

View file

@ -293,7 +293,7 @@ void CChat::AddLine(int ClientID, int Team, const char *pLine)
char aBuf[1024];
str_format(aBuf, sizeof(aBuf), "%s%s", m_aLines[m_CurrentLine].m_aName, m_aLines[m_CurrentLine].m_aText);
Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "chat", aBuf);
Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, m_aLines[m_CurrentLine].m_Team?"teamchat":"chat", aBuf);
}
// play sound

View file

@ -449,7 +449,9 @@ void CGameConsole::OnRender()
}
TextRender()->TextEx(&Cursor, aInputString, pConsole->m_Input.GetCursorOffset());
static float MarkerOffset = TextRender()->TextWidth(0, FontSize, "|", -1)/3;
CTextCursor Marker = Cursor;
Marker.m_X -= MarkerOffset;
TextRender()->TextEx(&Marker, "|", -1);
TextRender()->TextEx(&Cursor, aInputString+pConsole->m_Input.GetCursorOffset(), -1);

View file

@ -42,11 +42,11 @@ void CDebugHud::RenderNetCorrections()
x = Width-10.0f;
char aBuf[128];
str_format(aBuf, sizeof(aBuf), "%.0f", Velspeed);
str_format(aBuf, sizeof(aBuf), "%.0f", Velspeed/32);
float w = TextRender()->TextWidth(0, Fontsize, aBuf, -1);
TextRender()->Text(0, x-w, y, Fontsize, aBuf, -1);
y += LineHeight;
str_format(aBuf, sizeof(aBuf), "%.0f", Velspeed*Ramp);
str_format(aBuf, sizeof(aBuf), "%.0f", Velspeed/32*Ramp);
w = TextRender()->TextWidth(0, Fontsize, aBuf, -1);
TextRender()->Text(0, x-w, y, Fontsize, aBuf, -1);
y += LineHeight;
@ -54,11 +54,11 @@ void CDebugHud::RenderNetCorrections()
w = TextRender()->TextWidth(0, Fontsize, aBuf, -1);
TextRender()->Text(0, x-w, y, Fontsize, aBuf, -1);
y += 2*LineHeight;
str_format(aBuf, sizeof(aBuf), "%d", m_pClient->m_Snap.m_pLocalCharacter->m_X);
str_format(aBuf, sizeof(aBuf), "%d", m_pClient->m_Snap.m_pLocalCharacter->m_X/32);
w = TextRender()->TextWidth(0, Fontsize, aBuf, -1);
TextRender()->Text(0, x-w, y, Fontsize, aBuf, -1);
y += LineHeight;
str_format(aBuf, sizeof(aBuf), "%d", m_pClient->m_Snap.m_pLocalCharacter->m_Y);
str_format(aBuf, sizeof(aBuf), "%d", m_pClient->m_Snap.m_pLocalCharacter->m_Y/32);
w = TextRender()->TextWidth(0, Fontsize, aBuf, -1);
TextRender()->Text(0, x-w, y, Fontsize, aBuf, -1);
y += 2*LineHeight;

View file

@ -89,7 +89,7 @@ void CEffects::SmokeTrail(vec2 Pos, vec2 Vel)
p.m_LifeSpan = 0.5f + frandom()*0.5f;
p.m_StartSize = 12.0f + frandom()*8;
p.m_EndSize = 0;
p.m_Friction = 0.7;
p.m_Friction = 0.7f;
p.m_Gravity = frandom()*-500.0f;
m_pClient->m_pParticles->Add(CParticles::GROUP_PROJECTILE_TRAIL, &p);
}

View file

@ -63,21 +63,25 @@ void CMapLayers::EnvelopeEval(float TimeOffset, int Env, float *pChannels, void
CMapItemEnvelope *pItem = (CMapItemEnvelope *)pThis->m_pLayers->Map()->GetItem(Start+Env, 0, 0);
static float Time = 0;
if(pThis->Client()->State() == IClient::STATE_DEMOPLAYBACK)
{
const IDemoPlayer::CInfo *pInfo = pThis->DemoPlayer()->BaseInfo();
static float Time = 0;
static float LastLocalTime = pThis->Client()->LocalTime();
static int LastLocalTick = pInfo->m_CurrentTick;
if(!pInfo->m_Paused)
Time += (pThis->Client()->LocalTime()-LastLocalTime)*pInfo->m_Speed;
Time += (pInfo->m_CurrentTick-LastLocalTick) / (float)pThis->Client()->GameTickSpeed() * pInfo->m_Speed;
pThis->RenderTools()->RenderEvalEnvelope(pPoints+pItem->m_StartPoint, pItem->m_NumPoints, 4, Time+TimeOffset, pChannels);
LastLocalTime = pThis->Client()->LocalTime();
LastLocalTick = pInfo->m_CurrentTick;
}
else
pThis->RenderTools()->RenderEvalEnvelope(pPoints+pItem->m_StartPoint, pItem->m_NumPoints, 4, pThis->Client()->LocalTime()+TimeOffset, pChannels);
{
if(pThis->m_pClient->m_Snap.m_pGameInfoObj)
Time = (pThis->Client()->GameTick()-pThis->m_pClient->m_Snap.m_pGameInfoObj->m_RoundStartTick) / (float)pThis->Client()->GameTickSpeed();
pThis->RenderTools()->RenderEvalEnvelope(pPoints+pItem->m_StartPoint, pItem->m_NumPoints, 4, Time+TimeOffset, pChannels);
}
}
void CMapLayers::OnRender()

View file

@ -656,8 +656,6 @@ void CMenus::RenderLoading()
RenderBackground();
float tw;
float w = 700;
float h = 200;
float x = Screen.w/2-w/2;
@ -674,7 +672,6 @@ void CMenus::RenderLoading()
const char *pCaption = Localize("Loading DDRace Client");
tw = TextRender()->TextWidth(0, 48.0f, pCaption, -1);
CUIRect r;
r.x = x;
r.y = y+20;
@ -977,7 +974,7 @@ int CMenus::Render()
Box.VMargin(20.f/UI()->Scale(), &Box);
if(m_pClient->Editor()->HasUnsavedData())
{
char aBuf[128];
char aBuf[256];
str_format(aBuf, sizeof(aBuf), "%s\n%s", Localize("There's an unsaved map in the editor, you might want to save it before you quit the game."), Localize("Quit anyway?"));
UI()->DoLabelScaled(&Box, aBuf, 20.f, -1, Part.w-20.0f);
}

View file

@ -481,6 +481,10 @@ void CMenus::RenderServerbrowserFilters(CUIRect View)
ServerFilter.HSplitTop(20.0f, &Button, &ServerFilter);
if (DoButton_CheckBox((char *)&g_Config.m_BrFilterPureMap, Localize("Standard map"), g_Config.m_BrFilterPureMap, &Button))
g_Config.m_BrFilterPureMap ^= 1;
ServerFilter.HSplitTop(20.0f, &Button, &ServerFilter);
if (DoButton_CheckBox((char *)&g_Config.m_BrFilterGametypeStrict, Localize("Strict gametype filter"), g_Config.m_BrFilterGametypeStrict, &Button))
g_Config.m_BrFilterGametypeStrict ^= 1;
ServerFilter.HSplitTop(5.0f, 0, &ServerFilter);
@ -530,6 +534,7 @@ void CMenus::RenderServerbrowserFilters(CUIRect View)
g_Config.m_BrFilterString[0] = 0;
g_Config.m_BrFilterPure = 0;
g_Config.m_BrFilterPureMap = 0;
g_Config.m_BrFilterGametypeStrict = 0;
Client()->ServerBrowserUpdate();
}
}
@ -619,23 +624,24 @@ void CMenus::RenderServerbrowserServerDetail(CUIRect View)
if (pSelectedServer)
{
ServerScoreBoard.VSplitLeft(5.0f, 0, &ServerScoreBoard);
ServerScoreBoard.Margin(3.0f, &ServerScoreBoard);
for (int i = 0; i < pSelectedServer->m_NumClients; i++)
{
CUIRect Name, Clan, Score, Flag;
ServerScoreBoard.HSplitTop(25.0f, &Name, &ServerScoreBoard);
RenderTools()->DrawUIRect(&Name, vec4(1,1,1,(i%2+1)*0.05f), CUI::CORNER_ALL, 4.0f);
Name.VSplitLeft(5.0f, 0, &Name);
Name.VSplitLeft(30.0f, &Score, &Name);
Name.VSplitRight(34.0f, &Name, &Flag);
Flag.HMargin(4.0f, &Flag);
Name.HSplitTop(12.0f, &Name, &Clan);
Name.HSplitTop(11.0f, &Name, &Clan);
// score
if(pSelectedServer->m_aClients[i].m_Player)
{
char aTemp[16];
str_format(aTemp, sizeof(aTemp), "%d", pSelectedServer->m_aClients[i].m_Score);
TextRender()->SetCursor(&Cursor, Score.x, Score.y+(Score.h-FontSize)/2.0f, FontSize, TEXTFLAG_RENDER|TEXTFLAG_STOP_AT_END);
TextRender()->SetCursor(&Cursor, Score.x, Score.y+(Score.h-FontSize)/4.0f, FontSize, TEXTFLAG_RENDER|TEXTFLAG_STOP_AT_END);
Cursor.m_LineWidth = Score.w;
TextRender()->TextEx(&Cursor, aTemp, -1);
}

View file

@ -203,7 +203,7 @@ void CMenus::RenderDemoPlayer(CUIRect MainView)
// demo name
char aBuf[128];
str_format(aBuf, sizeof(aBuf), "Demofile: %s", DemoPlayer()->GetDemoName());
str_format(aBuf, sizeof(aBuf), Localize("Demofile: %s"), DemoPlayer()->GetDemoName());
CTextCursor Cursor;
TextRender()->SetCursor(&Cursor, NameBar.x, NameBar.y, Button.h*0.5f, TEXTFLAG_RENDER|TEXTFLAG_STOP_AT_END);
Cursor.m_LineWidth = MainView.w;
@ -373,7 +373,7 @@ CMenus::CListboxItem CMenus::UiDoListboxNextItem(const void *pId, bool Selected)
{
gs_ListBoxDoneEvents = 1;
if(m_EnterPressed || (Input()->MouseDoubleClick() && UI()->ActiveItem() == pId))
if(m_EnterPressed || (UI()->ActiveItem() == pId && Input()->MouseDoubleClick()))
{
gs_ListBoxItemActivated = true;
UI()->SetActiveItem(0);
@ -555,8 +555,8 @@ void CMenus::RenderDemoList(CUIRect MainView)
Labels.HSplitTop(20.0f, &Left, &Labels);
Left.VSplitLeft(150.0f, &Left, &Right);
UI()->DoLabelScaled(&Left, Localize("Length:"), 14.0f, -1);
int Length = (m_lDemos[m_DemolistSelectedIndex].m_Info.m_aLength[0]<<24) | (m_lDemos[m_DemolistSelectedIndex].m_Info.m_aLength[1]<<16) |
(m_lDemos[m_DemolistSelectedIndex].m_Info.m_aLength[2]<<8) | (m_lDemos[m_DemolistSelectedIndex].m_Info.m_aLength[3]);
int Length = ((m_lDemos[m_DemolistSelectedIndex].m_Info.m_aLength[0]<<24)&0xFF000000) | ((m_lDemos[m_DemolistSelectedIndex].m_Info.m_aLength[1]<<16)&0xFF0000) |
((m_lDemos[m_DemolistSelectedIndex].m_Info.m_aLength[2]<<8)&0xFF00) | (m_lDemos[m_DemolistSelectedIndex].m_Info.m_aLength[3]&0xFF);
char aBuf[64];
str_format(aBuf, sizeof(aBuf), "%d:%02d", Length/60, Length%60);
UI()->DoLabelScaled(&Right, aBuf, 14.0f, -1);
@ -578,9 +578,9 @@ void CMenus::RenderDemoList(CUIRect MainView)
Left.VSplitLeft(20.0f, 0, &Left);
Left.VSplitLeft(130.0f, &Left, &Right);
UI()->DoLabelScaled(&Left, Localize("Size:"), 14.0f, -1);
Length = (m_lDemos[m_DemolistSelectedIndex].m_Info.m_aMapSize[0]<<24) | (m_lDemos[m_DemolistSelectedIndex].m_Info.m_aMapSize[1]<<16) |
unsigned Size = (m_lDemos[m_DemolistSelectedIndex].m_Info.m_aMapSize[0]<<24) | (m_lDemos[m_DemolistSelectedIndex].m_Info.m_aMapSize[1]<<16) |
(m_lDemos[m_DemolistSelectedIndex].m_Info.m_aMapSize[2]<<8) | (m_lDemos[m_DemolistSelectedIndex].m_Info.m_aMapSize[3]);
str_format(aBuf, sizeof(aBuf), Localize("%d Bytes"), Length);
str_format(aBuf, sizeof(aBuf), Localize("%d Bytes"), Size);
UI()->DoLabelScaled(&Right, aBuf, 14.0f, -1);
Labels.HSplitTop(5.0f, 0, &Labels);
Labels.HSplitTop(20.0f, &Left, &Labels);

View file

@ -194,10 +194,12 @@ void CMenus::RenderPlayers(CUIRect MainView)
Button.VSplitLeft((Width-Button.h)/4.0f, 0, &Button);
Button.VSplitLeft(Button.h, &Button, 0);
if(DoButton_Toggle(&s_aPlayerIDs[i][1], m_pClient->m_aClients[i].m_Friend, &Button))
{
if(m_pClient->m_aClients[i].m_Friend)
m_pClient->Friends()->RemoveFriend(m_pClient->m_aClients[i].m_aName, m_pClient->m_aClients[i].m_aClan);
else
m_pClient->Friends()->AddFriend(m_pClient->m_aClients[i].m_aName, m_pClient->m_aClients[i].m_aClan);
}
}
/*

View file

@ -64,8 +64,8 @@ void CSpectator::ConSpectateNext(IConsole::IResult *pResult, void *pUserData, in
if(!pSelf->m_pClient->m_Snap.m_paPlayerInfos[i] || pSelf->m_pClient->m_Snap.m_paPlayerInfos[i]->m_Team == TEAM_SPECTATORS)
continue;
NewSpectatorID = i;
GotNewSpectatorID = true;
NewSpectatorID = i;
GotNewSpectatorID = true;
break;
}
}
@ -236,6 +236,23 @@ void CSpectator::OnRender()
TextRender()->TextColor(1.0f, 1.0f, 1.0f, Selected?1.0f:0.5f);
TextRender()->Text(0, Width/2.0f+x+50.0f, Height/2.0f+y+5.0f, FontSize, m_pClient->m_aClients[i].m_aName, 220.0f);
// flag
if(m_pClient->m_Snap.m_pGameInfoObj->m_GameFlags&GAMEFLAG_FLAGS &&
m_pClient->m_Snap.m_pGameDataObj && (m_pClient->m_Snap.m_pGameDataObj->m_FlagCarrierRed == m_pClient->m_Snap.m_paPlayerInfos[i]->m_ClientID ||
m_pClient->m_Snap.m_pGameDataObj->m_FlagCarrierBlue == m_pClient->m_Snap.m_paPlayerInfos[i]->m_ClientID))
{
Graphics()->BlendNormal();
Graphics()->TextureSet(g_pData->m_aImages[IMAGE_GAME].m_Id);
Graphics()->QuadsBegin();
RenderTools()->SelectSprite(m_pClient->m_Snap.m_paPlayerInfos[i]->m_Team==TEAM_RED ? SPRITE_FLAG_BLUE : SPRITE_FLAG_RED, SPRITE_FLAG_FLIP_X);
float Size = LineHeight;
IGraphics::CQuadItem QuadItem(Width/2.0f+x-LineHeight/5.0f, Height/2.0f+y-LineHeight/3.0f, Size/2.0f, Size);
Graphics()->QuadsDrawTL(&QuadItem, 1);
Graphics()->QuadsEnd();
}
CTeeRenderInfo TeeInfo = m_pClient->m_aClients[i].m_RenderInfo;
RenderTools()->RenderTee(CAnimState::GetIdle(), &TeeInfo, EMOTE_NORMAL, vec2(1.0f, 0.0f), vec2(Width/2.0f+x+20.0f, Height/2.0f+y+20.0f));

View file

@ -20,7 +20,7 @@
#include <game/client/render.h>
#include <game/generated/client_data.h>
#include "ed_editor.h"
#include "editor.h"
#include <game/client/lineinput.h>
#include <game/localization.h>
@ -489,15 +489,12 @@ int CEditor::UiDoValueSelector(void *pID, CUIRect *pRect, const char *pLabel, in
{
// logic
static float s_Value;
int Ret = 0;
int Inside = UI()->MouseInside(pRect);
if(UI()->ActiveItem() == pID)
{
if(!UI()->MouseButton(0))
{
if(Inside)
Ret = 1;
m_LockMouse = false;
UI()->SetActiveItem(0);
}
@ -756,8 +753,7 @@ void CEditor::DoToolbar(CUIRect ToolBar)
if(Input()->KeyPresses(KEY_MOUSE_WHEEL_DOWN) && m_Dialog == DIALOG_NONE)
m_ZoomLevel += 20;
if(m_ZoomLevel < 50)
m_ZoomLevel = 50;
m_ZoomLevel = clamp(m_ZoomLevel, 50, 2000);
m_WorldZoom = m_ZoomLevel/100.0f;
TB_Top.VSplitLeft(10.0f, &Button, &TB_Top);
@ -1201,12 +1197,8 @@ void CEditor::DoQuadPoint(CQuad *pQuad, int QuadIndex, int V)
void CEditor::DoMapEditor(CUIRect View, CUIRect ToolBar)
{
//UI()->ClipEnable(&view);
bool ShowPicker = Input()->KeyPressed(KEY_SPACE) != 0 && m_Dialog == DIALOG_NONE;
// render all good stuff
if(!ShowPicker)
if(!m_ShowPicker)
{
for(int g = 0; g < m_Map.m_lGroups.size(); g++)
{// don't render the front, tele, speedup and switch layer now we will do it later to make them on top of others
@ -1259,8 +1251,6 @@ void CEditor::DoMapEditor(CUIRect View, CUIRect ToolBar)
static float s_StartWx = 0;
static float s_StartWy = 0;
static float s_StartMx = 0;
static float s_StartMy = 0;
enum
{
@ -1273,7 +1263,7 @@ void CEditor::DoMapEditor(CUIRect View, CUIRect ToolBar)
};
// remap the screen so it can display the whole tileset
if(ShowPicker)
if(m_ShowPicker)
{
CUIRect Screen = *UI()->Screen();
float Size = 32.0*16.0f;
@ -1302,7 +1292,7 @@ void CEditor::DoMapEditor(CUIRect View, CUIRect ToolBar)
int NumEditLayers = 0;
NumEditLayers = 0;
if(ShowPicker)
if(m_ShowPicker)
{
pEditLayers[0] = &m_TilesetPicker;
NumEditLayers++;
@ -1348,8 +1338,6 @@ void CEditor::DoMapEditor(CUIRect View, CUIRect ToolBar)
{
s_StartWx = wx;
s_StartWy = wy;
s_StartMx = mx;
s_StartMy = my;
if(Input()->KeyPressed(KEY_LCTRL) || Input()->KeyPressed(KEY_RCTRL) || UI()->MouseButton(2))
{
@ -1508,7 +1496,7 @@ void CEditor::DoMapEditor(CUIRect View, CUIRect ToolBar)
// quad editing
{
if(!ShowPicker && m_Brush.IsEmpty())
if(!m_ShowPicker && m_Brush.IsEmpty())
{
// fetch layers
CLayerGroup *g = GetSelectedGroup();
@ -1835,14 +1823,6 @@ void CEditor::RenderLayers(CUIRect ToolBox, CUIRect ToolBar, CUIRect View)
CUIRect Slot, Button;
char aBuf[64];
int ValidGroup = 0;
int ValidLayer = 0;
if(m_SelectedGroup >= 0 && m_SelectedGroup < m_Map.m_lGroups.size())
ValidGroup = 1;
if(ValidGroup && m_SelectedLayer >= 0 && m_SelectedLayer < m_Map.m_lGroups[m_SelectedGroup]->m_lLayers.size())
ValidLayer = 1;
float LayersHeight = 12.0f; // Height of AddGroup button
static int s_ScrollBar = 0;
static float s_ScrollValue = 0;
@ -2280,7 +2260,7 @@ void CEditor::AddFileDialogEntry(int Index, CUIRect *pView)
Graphics()->QuadsDrawTL(&QuadItem, 1);
Graphics()->QuadsEnd();
if(DoButton_File((void*)(10+(int)Button.y), m_FileList[Index].m_aName, m_FilesSelectedIndex == Index, &Button, 0, 0))
if(DoButton_File(&m_FileList[Index], m_FileList[Index].m_aName, m_FilesSelectedIndex == Index, &Button, 0, 0))
{
if(!m_FileList[Index].m_IsDir)
str_copy(m_aFileDialogFileName, m_FileList[Index].m_aFilename, sizeof(m_aFileDialogFileName));
@ -2887,8 +2867,6 @@ void CEditor::RenderEnvelopeEditor(CUIRect View)
// render handles
{
static bool s_Move = false;
int CurrentValue = 0, CurrentTime = 0;
Graphics()->TextureSet(-1);
@ -2922,7 +2900,6 @@ void CEditor::RenderEnvelopeEditor(CUIRect View)
if(!UI()->MouseButton(0))
{
UI()->SetActiveItem(0);
s_Move = false;
}
else
{
@ -3126,6 +3103,7 @@ void CEditor::Render()
RenderBackground(View, ms_CheckerTexture, 32.0f, 1.0f);
CUIRect MenuBar, CModeBar, ToolBar, StatusBar, EnvelopeEditor, ToolBox;
m_ShowPicker = Input()->KeyPressed(KEY_SPACE) != 0 && m_Dialog == DIALOG_NONE;
if(m_GuiActive)
{
@ -3135,7 +3113,7 @@ void CEditor::Render()
View.VSplitLeft(100.0f, &ToolBox, &View);
View.HSplitBottom(16.0f, &View, &StatusBar);
if(m_ShowEnvelopeEditor)
if(m_ShowEnvelopeEditor && !m_ShowPicker)
{
float size = 125.0f;
if(m_ShowEnvelopeEditor == 2)

View file

@ -1,7 +1,7 @@
/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
/* If you are missing that file, acquire a complete release at teeworlds.com. */
#ifndef GAME_EDITOR_ED_EDITOR_H
#define GAME_EDITOR_ED_EDITOR_H
#ifndef GAME_EDITOR_EDITOR_H
#define GAME_EDITOR_EDITOR_H
#include <base/system.h>
#include <base/math.h>
@ -662,6 +662,7 @@ public:
float m_AnimateSpeed;
int m_ShowEnvelopeEditor;
bool m_ShowPicker;
int m_SelectedLayer;
int m_SelectedGroup;

View file

@ -9,7 +9,7 @@
#include <engine/serverbrowser.h>
#include <engine/storage.h>
#include <game/gamecore.h>
#include "ed_editor.h"
#include "editor.h"
template<typename T>
static int MakeVersion(int i, const T &v)

View file

@ -1,6 +1,6 @@
/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
/* If you are missing that file, acquire a complete release at teeworlds.com. */
#include "ed_editor.h"
#include "editor.h"
CLayerGame::CLayerGame(int w, int h)

View file

@ -5,7 +5,7 @@
#include <engine/console.h>
#include <engine/graphics.h>
#include "ed_editor.h"
#include "editor.h"
#include <game/generated/client_data.h>
#include <game/client/render.h>
#include <game/localization.h>

View file

@ -8,7 +8,7 @@
#include <game/generated/client_data.h>
#include <game/client/render.h>
#include "ed_editor.h"
#include "editor.h"
#include <game/localization.h>
@ -139,7 +139,7 @@ void CLayerTiles::BrushSelecting(CUIRect Rect)
m_pEditor->Graphics()->QuadsEnd();
char aBuf[16];
str_format(aBuf, sizeof(aBuf), "%d,%d", ConvertX(Rect.w), ConvertY(Rect.h));
TextRender()->Text(0, Rect.x+3.0f, Rect.y+3.0f, 15.0f*m_pEditor->m_WorldZoom, aBuf, -1);
TextRender()->Text(0, Rect.x+3.0f, Rect.y+3.0f, m_pEditor->m_ShowPicker?15.0f:15.0f*m_pEditor->m_WorldZoom, aBuf, -1);
}
int CLayerTiles::BrushGrab(CLayerGroup *pBrush, CUIRect Rect)

View file

@ -5,7 +5,7 @@
#include <engine/input.h>
#include <engine/keys.h>
#include <engine/storage.h>
#include "ed_editor.h"
#include "editor.h"
// popup menu handling

View file

@ -124,8 +124,6 @@ void CCharacter::HandleNinja()
if(m_ActiveWeapon != WEAPON_NINJA)
return;
vec2 Direction = normalize(vec2(m_LatestInput.m_TargetX, m_LatestInput.m_TargetY));
if ((Server()->Tick() - m_Ninja.m_ActivationTick) > (g_pData->m_Weapons.m_Ninja.m_Duration * Server()->TickSpeed() / 1000))
{
// time's up, return
@ -491,7 +489,6 @@ void CCharacter::HandleWeapons()
//ninja
HandleNinja();
vec2 Direction = normalize(vec2(m_LatestInput.m_TargetX, m_LatestInput.m_TargetY));
if(m_PainSoundTimer > 0)
m_PainSoundTimer--;

View file

@ -74,7 +74,6 @@ void CLaser::DoBounce()
}
m_PrevPos = m_Pos;
vec2 To = m_Pos + m_Dir * m_Energy;
vec2 OrgTo = To;
vec2 Coltile;
int Res;

View file

@ -276,7 +276,7 @@ void CGameContext::SendChat(int ChatterClientID, int Team, const char *pText, in
}
else
str_format(aBuf, sizeof(aBuf), "*** %s", aText);
Console()->Print(IConsole::OUTPUT_LEVEL_ADDINFO, "chat", aBuf);
Console()->Print(IConsole::OUTPUT_LEVEL_ADDINFO, Team!=CHAT_ALL?"teamchat":"chat", aBuf);
if(Team == CHAT_ALL)
{

View file

@ -184,7 +184,6 @@ CCharacter *CGameWorld::IntersectCharacter(vec2 Pos0, vec2 Pos1, float Radius, v
{
// Find other players
float ClosestLen = distance(Pos0, Pos1) * 100.0f;
vec2 LineDir = normalize(Pos1-Pos0);
CCharacter *pClosest = 0;
CCharacter *p = (CCharacter *)FindFirst(ENTTYPE_CHARACTER);

View file

@ -22,8 +22,8 @@ CPlayer::CPlayer(CGameContext *pGameServer, int ClientID, int Team)
m_RespawnTick = Server()->Tick();
m_DieTick = Server()->Tick();
m_ScoreStartTick = Server()->Tick();
Character = 0;
this->m_ClientID = ClientID;
m_pCharacter = 0;
m_ClientID = ClientID;
m_Team = GameServer()->m_pController->ClampTeam(Team);
m_SpectatorID = SPEC_FREEVIEW;
m_LastActionTick = Server()->Tick();
@ -50,8 +50,8 @@ CPlayer::CPlayer(CGameContext *pGameServer, int ClientID, int Team)
CPlayer::~CPlayer()
{
delete Character;
Character = 0;
delete m_pCharacter;
m_pCharacter = 0;
}
void CPlayer::Tick()
@ -88,19 +88,19 @@ void CPlayer::Tick()
}
}
if(!Character && m_DieTick+Server()->TickSpeed()*3 <= Server()->Tick())
if(!m_pCharacter && m_DieTick+Server()->TickSpeed()*3 <= Server()->Tick())
m_Spawning = true;
if(Character)
if(m_pCharacter)
{
if(Character->IsAlive())
if(m_pCharacter->IsAlive())
{
m_ViewPos = Character->m_Pos;
m_ViewPos = m_pCharacter->m_Pos;
}
else
{
delete Character;
Character = 0;
delete m_pCharacter;
m_pCharacter = 0;
}
}
else if(m_Spawning && m_RespawnTick <= Server()->Tick())
@ -200,21 +200,29 @@ void CPlayer::OnDisconnect(const char *pReason)
void CPlayer::OnPredictedInput(CNetObj_PlayerInput *NewInput)
{
if(Character)
Character->OnPredictedInput(NewInput);
// skip the input if chat is active
if((m_PlayerFlags&PLAYERFLAG_CHATTING) && (NewInput->m_PlayerFlags&PLAYERFLAG_CHATTING))
return;
if(m_pCharacter)
m_pCharacter->OnPredictedInput(NewInput);
}
void CPlayer::OnDirectInput(CNetObj_PlayerInput *NewInput)
{
// skip the input if chat is active
if((m_PlayerFlags&PLAYERFLAG_CHATTING) && (NewInput->m_PlayerFlags&PLAYERFLAG_CHATTING))
return;
m_PlayerFlags = NewInput->m_PlayerFlags;
if(Character)
Character->OnDirectInput(NewInput);
if(m_pCharacter)
m_pCharacter->OnDirectInput(NewInput);
if(!Character && m_Team != TEAM_SPECTATORS && (NewInput->m_Fire&1))
if(!m_pCharacter && m_Team != TEAM_SPECTATORS && (NewInput->m_Fire&1))
m_Spawning = true;
if(!Character && m_Team == TEAM_SPECTATORS && m_SpectatorID == SPEC_FREEVIEW)
if(!m_pCharacter && m_Team == TEAM_SPECTATORS && m_SpectatorID == SPEC_FREEVIEW)
m_ViewPos = vec2(NewInput->m_TargetX, NewInput->m_TargetY);
if (AfkTimer(NewInput->m_TargetX, NewInput->m_TargetY))
return; // we must return if kicked, as player struct is already deleted
@ -231,18 +239,18 @@ void CPlayer::OnDirectInput(CNetObj_PlayerInput *NewInput)
CCharacter *CPlayer::GetCharacter()
{
if(Character && Character->IsAlive())
return Character;
if(m_pCharacter && m_pCharacter->IsAlive())
return m_pCharacter;
return 0;
}
void CPlayer::KillCharacter(int Weapon)
{
if(Character)
if(m_pCharacter)
{
Character->Die(m_ClientID, Weapon);
delete Character;
Character = 0;
m_pCharacter->Die(m_ClientID, Weapon);
delete m_pCharacter;
m_pCharacter = 0;
}
}
@ -302,8 +310,8 @@ void CPlayer::TryRespawn()
return;
m_Spawning = false;
Character = new(m_ClientID) CCharacter(&GameServer()->m_World);
Character->Spawn(this, SpawnPos);
m_pCharacter = new(m_ClientID) CCharacter(&GameServer()->m_World);
m_pCharacter->Spawn(this, SpawnPos);
GameServer()->CreatePlayerSpawn(SpawnPos);
}
}

View file

@ -96,7 +96,7 @@ public:
} m_Latency;
private:
CCharacter *Character;
CCharacter *m_pCharacter;
CGameContext *m_pGameServer;
CGameContext *GameServer() const { return m_pGameServer; }

View file

@ -2,7 +2,7 @@
/* If you are missing that file, acquire a complete release at teeworlds.com. */
#ifndef GAME_VERSION_H
#define GAME_VERSION_H
#include "generated/nethash.c"
#include "generated/nethash.cpp"
#define GAME_VERSION "0.6 trunk, 1.075a"
#define GAME_NETVERSION "0.6 626fce9a778df4d4"
#endif

View file

@ -1,6 +1,5 @@
/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
/* If you are missing that file, acquire a complete release at teeworlds.com. */
#include <stdlib.h>
#include <base/system.h>
#include <engine/external/pnglite/pnglite.h>