qmlfrontend/game_config.h
author Wuzzy <Wuzzy2@mail.ru>
Mon, 16 Sep 2019 17:33:49 +0200
changeset 15410 8504fee3b601
parent 14273 645e4591361f
permissions -rw-r--r--
Racer: Fix weird water splashes after waypoint placement Does not affect official racer, as only waypoint placement is touched. The reason was that the air attack gear sometimes was not deleted fast enough so it might occassionally drop some air bombs (these are deleted now). Also, the airplane position was set to water level, which caused another water splash.

#ifndef GAMECONFIG_H
#define GAMECONFIG_H

#include <QList>
#include <QVector>

#include "team.h"

class GameConfig {
 public:
  explicit GameConfig();

  const char** argv() const;
  int argc() const;
  const QList<QByteArray> config() const;

  void clear();
  void cmdSeed(const QByteArray& seed);
  void cmdTheme(const QByteArray& theme);
  void cmdMapgen(int mapgen);
  void cmdTeam(const Team& team);

 private:
  mutable QVector<const char*> m_argv;
  QList<QByteArray> m_arguments;
  QList<QByteArray> m_cfg;
  QList<Team> m_teams;

  void cfgAppend(const QByteArray& cmd);
};

#endif  // GAMECONFIG_H