fix Credits
This commit is contained in:
@@ -105,7 +105,7 @@ func handleWebSocket(w http.ResponseWriter, r *http.Request) {
|
||||
for {
|
||||
select {
|
||||
case <-closeChan:
|
||||
return // Client weg
|
||||
return
|
||||
|
||||
case <-ticker.C:
|
||||
InputLoop:
|
||||
@@ -251,7 +251,7 @@ func generateFutureObjects(s *SimState, tick int, speed float64) ([]ActiveObstac
|
||||
for _, def := range defaultConfig.Obstacles {
|
||||
if def.ID == o.ID {
|
||||
if def.CanTalk && len(def.SpeechLines) > 0 {
|
||||
if s.RNG.NextFloat() > 0.7 { // 30% Wahrscheinlichkeit
|
||||
if s.RNG.NextFloat() > 0.7 {
|
||||
sIdx := int(s.RNG.NextRange(0, float64(len(def.SpeechLines))))
|
||||
speech = def.SpeechLines[sIdx]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user