Messages.h 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981
  1. /*-------------------------------------------------------------------------
  2. * \src\Inc\Messages.h
  3. *
  4. * Interface between Allegiance and AllSrv
  5. *
  6. * Owner:
  7. *
  8. * Copyright 1986-1998 Microsoft Corporation, All Rights Reserved
  9. *-----------------------------------------------------------------------*/
  10. #ifndef _MESSAGES_
  11. #define _MESSAGES_
  12. #include "MessageCore.h"
  13. /* this gets incremented for any change to the file. On client startup, we
  14. make sure the client version is equal to the server version. Of course,
  15. at a later date, if we decide to allow the server to support out of date
  16. clients, we can leave in the old structure of message(s) and the server can
  17. use whichever, depending on the version of client connected. Since we have
  18. one server, and many clients, the server is always up to date by definition.
  19. ***Also gets incremented for changes to parts.h***
  20. */
  21. const int MSGVER = 198;
  22. /*
  23. *************************************************
  24. MESSAGES START HERE
  25. Messages range for this file is 1 - 200
  26. *************************************************
  27. */
  28. struct PassengerData
  29. {
  30. ShipID shipID;
  31. Mount turretID;
  32. };
  33. DEFINE_FEDMSG(C, LOGONREQ, 1) // First message the client sends to the server.
  34. FM_VAR_ITEM(CharacterName); // Setting character name/pw to non-NULL implies
  35. FM_VAR_ITEM(ZoneTicket); // Encrypted
  36. FM_VAR_ITEM(CDKey); // Scrambled using CharacterName
  37. FM_VAR_ITEM(MissionPassword); // The password (if any) required for the mission.
  38. USHORT fedsrvVer;
  39. Time time;
  40. DWORD dwCookie;
  41. int crcFileList;
  42. END_FEDMSG
  43. DEFINE_FEDMSG(S, LOGONACK, 2) // sent when the server recives FM_C_LOGONREQ
  44. FM_VAR_ITEM(CharName_OR_FailureReason);
  45. Time timeServer; // the server time when the request was processed
  46. ShipID shipID; // uniquely identifies this ship
  47. bool fValidated; // if false, server will disconnect client after sending this message
  48. bool fRetry; // if true, the client may want to present the user with the logon dialog again
  49. Cookie cookie;
  50. END_FEDMSG
  51. DEFINE_FEDMSG(CS, LOGOFF, 3) // sent when the client wants to logoff, mirrored back to client.
  52. END_FEDMSG
  53. DEFINE_FEDMSG(C, BUY_LOADOUT, 4)
  54. FM_VAR_ITEM(loadout);
  55. bool fLaunch;
  56. END_FEDMSG
  57. DEFINE_FEDMSG(S, BUY_LOADOUT_ACK, 5)
  58. FM_VAR_ITEM(loadout);
  59. bool fBoughtEverything : 1;
  60. bool fLaunch : 1; // the server will still send the normal launch messages
  61. END_FEDMSG
  62. DEFINE_FEDMSG(S, OBJECT_SPOTTED, 6)
  63. ObjectType otObject;
  64. ObjectID oidObject;
  65. ObjectType otSpotter;
  66. ObjectID oidSpotter;
  67. END_FEDMSG
  68. DEFINE_FEDMSG(S, SET_CLUSTER, 7)
  69. SectorID sectorID;
  70. ServerSingleShipUpdate shipupdate;
  71. Cookie cookie;
  72. END_FEDMSG
  73. DEFINE_FEDMSG(S, DEV_COMPLETED, 8)
  74. DevelopmentID devId;
  75. END_FEDMSG
  76. DEFINE_FEDMSG(S, SET_BRIEFING_TEXT, 9)
  77. FM_VAR_ITEM(text); // the full briefing text if fGenerateStandardText, else just the starting location
  78. bool fGenerateCivBriefing;
  79. END_FEDMSG
  80. DEFINE_FEDMSG(S, PLAYERINFO, 10)
  81. FM_VAR_ITEM(rgPersistPlayerScores);
  82. // PersistPlayerScoreObject rgPersistPlayerScores[pfm->cbrgPersistPlayerScores / sizeof(PersistPlayerScoreObject)] = FM_VAR_REF(pfm, rgPersistPlayerScores);
  83. char CharacterName[c_cbName];
  84. Money money;
  85. bool fReady : 1;
  86. bool fTeamLeader : 1;
  87. bool fMissionOwner : 1;
  88. short nKills;
  89. short nEjections;
  90. short nDeaths;
  91. float fExperience;
  92. SideID iSide;
  93. ShipID shipID;
  94. RankID rankID;
  95. //WingID wingID;
  96. DroneTypeID dtidDrone;
  97. PilotType pilotType;
  98. AbilityBitMask abmOrders;
  99. ObjectID baseObjectID;
  100. END_FEDMSG
  101. struct StaticMapInfo
  102. {
  103. char cbIGCFile[c_cbFileName];
  104. char cbFriendlyName[c_cbName];
  105. int nNumTeams;
  106. };
  107. DEFINE_FEDMSG(S, STATIC_MAP_INFO, 11)
  108. FM_VAR_ITEM(maps); // an array of StaticMapInfo structures in order of appearance
  109. END_FEDMSG
  110. DEFINE_FEDMSG(CS, PROJECTILE_INSTANCE, 12)
  111. Time timeCreate;
  112. DataProjectileIGC data;
  113. Vector position;
  114. END_FEDMSG
  115. // keep in sync copy in ClubMessages.h
  116. struct RankInfo
  117. {
  118. int requiredRanking;
  119. CivID civ;
  120. RankID rank;
  121. char RankName[c_cbName];
  122. };
  123. DEFINE_FEDMSG(S, RANK_INFO, 13)
  124. FM_VAR_ITEM(ranks); // an array of RankInfo sorted by civ, then rank
  125. short cRanks;
  126. END_FEDMSG
  127. DEFINE_FEDMSG(S, SET_START_TIME, 14)
  128. Time timeStart;
  129. END_FEDMSG
  130. DEFINE_FEDMSG(CS, SET_TEAM_INFO, 15)
  131. SquadID squadID;
  132. SideID sideID;
  133. char SideName[c_cbName];
  134. END_FEDMSG
  135. DEFINE_FEDMSG(S, PLAYER_RESCUED, 16)
  136. ShipID shipIDRescuer;
  137. ShipID shipIDRescuee;
  138. END_FEDMSG
  139. typedef ObjectID BallotID;
  140. DEFINE_FEDMSG(S, BALLOT, 17)
  141. FM_VAR_ITEM(BallotText);
  142. ObjectType otInitiator;
  143. ObjectID oidInitiator;
  144. BallotID ballotID;
  145. Time timeExpiration;
  146. END_FEDMSG
  147. DEFINE_FEDMSG(S, CANCEL_BALLOT, 18)
  148. BallotID ballotID;
  149. END_FEDMSG
  150. DEFINE_FEDMSG(C, VOTE, 19)
  151. BallotID ballotID;
  152. bool bAgree;
  153. END_FEDMSG
  154. enum ShipDeleteReason
  155. {
  156. SDR_OUTOFRANGE, SDR_KILLED, SDR_LEFTSECTOR, SDR_DOCKED, // client will cache ships when deleted for these reasons
  157. SDR_LOGGEDOFF, // cliend is gone, so waste their ship and everything about it
  158. SDR_TERMINATE, // client is getting a new ship so blow the old one away.
  159. SDR_SUPERCEDED, // client will never get this. This happens when a client logs back in while their
  160. // previous connection still existed. The new connection supercedes the old one.
  161. };
  162. DEFINE_FEDMSG(S, SHIP_DELETE, 20) // when the ship is really not in the sector anymore
  163. ShipID shipID;
  164. ShipDeleteReason sdr;
  165. END_FEDMSG
  166. DEFINE_FEDMSG(C, RANDOMIZE_TEAMS, 21) // randomly assigns everyone to a team
  167. END_FEDMSG
  168. struct ChatData
  169. {
  170. ShipID sidSender;
  171. ChatTarget chatTarget;
  172. ObjectID oidRecipient;
  173. SoundID voiceOver;
  174. CommandID commandID;
  175. bool bObjectModel; // was chat object model generated?
  176. };
  177. DEFINE_FEDMSG(CS, CHATMESSAGE, 23)
  178. FM_VAR_ITEM(Message);
  179. ChatData cd;
  180. ObjectID oidTarget;
  181. ObjectType otTarget;
  182. END_FEDMSG
  183. // ship updates, repeatedly sent by the client at the following interval
  184. const float c_dsecUpdateClient = 0.15f;
  185. DEFINE_FEDMSG(C, SHIP_UPDATE, 24)
  186. Time timeUpdate;
  187. Cookie cookie; // last cookie received from message that has a cookie
  188. ClientShipUpdate shipupdate;
  189. END_FEDMSG
  190. // ***PARTS***
  191. #include "parts.h"
  192. // All part definition messages must start with Part, and have a single struct (in parts.h) after that
  193. // In order to be able to just copy structs without allocating them, all parts are two structs only.
  194. // First struct is always "Part part", and the next is specific to the part type.
  195. DEFINE_FEDMSG(S, EXPORT, 26)
  196. FM_VAR_ITEM(exportData);
  197. ObjectType objecttype;
  198. END_FEDMSG
  199. DEFINE_FEDMSG(S, POSTER, 27)
  200. char textureName[c_cbFileName];
  201. float latitude;
  202. float longitude;
  203. float radius;
  204. SectorID sectorID;
  205. END_FEDMSG
  206. DEFINE_FEDMSG(S, TREASURE, 28)
  207. DataTreasureIGC dataTreasure;
  208. END_FEDMSG
  209. DEFINE_FEDMSG(S, DESTROY_TREASURE, 30)
  210. TreasureID treasureID;
  211. SectorID sectorID;
  212. END_FEDMSG
  213. DEFINE_FEDMSG(CS, NEW_SHIP_INSTANCE, 31)
  214. FM_VAR_ITEM(exportData); // DataShip
  215. END_FEDMSG
  216. DEFINE_FEDMSG(CS, DROP_PART, 33) // drop part to space
  217. ShipID shipID; // ignored for message sent to server
  218. EquipmentType et;
  219. Mount mount;
  220. END_FEDMSG
  221. // Mount Locations
  222. DEFINE_FEDMSG(CS, SWAP_PART, 34) //Swap two parts
  223. ShipID shipID;
  224. EquipmentType etOld;
  225. Mount mountOld;
  226. Mount mountNew;
  227. END_FEDMSG
  228. DEFINE_FEDMSG(CS, PING, 35) // just send it back to client as soon as you get it
  229. Time timeClient; // client sets this, and server just leaves it
  230. Time timeServer; // Server sets this
  231. FMGuaranteed fmg; // how the client wants the server to send back the echo
  232. END_FEDMSG
  233. DEFINE_FEDMSG(S, URLROOT, 36) // where to download stuff from
  234. FM_VAR_ITEM(UrlRoot);
  235. END_FEDMSG
  236. DEFINE_FEDMSG(S, MISSION_STAGE, 37)
  237. STAGE stage;
  238. END_FEDMSG
  239. DEFINE_FEDMSG(S, MISSIONDEF, 38) // sent when a mission is created, and when it changes
  240. MissionParams misparms;
  241. char szDescription[c_cbDescription];
  242. DWORD dwCookie;
  243. SideID iSideMissionOwner; // mission owner is the team leader on that side
  244. bool fAutoAcceptLeaders : 1;
  245. bool fInProgress : 1;
  246. STAGE stage;
  247. // yes, for missions with fewer than c_cSidesMax sides, the following arrays will waste space,
  248. // but that allows us to just keep an array of missions
  249. // $CRC: should probably just make a struct for the per team stuff and have an array of the struct
  250. char rgszName [c_cSidesMax][c_cbSideName];
  251. //CivID rgCivID [c_cSidesMax];
  252. StationID rgStationID [c_cSidesMax]; // the station the team starts at (1 per team for now)
  253. ShipID rgShipIDLeaders [c_cSidesMax];
  254. char rgcPlayers [c_cSidesMax];
  255. char rgfAutoAccept [c_cSidesMax];
  256. char rgfReady [c_cSidesMax];
  257. char rgfForceReady [c_cSidesMax];
  258. char rgfActive [c_cSidesMax];
  259. END_FEDMSG
  260. DEFINE_FEDMSG(C, POSITIONREQ, 39) // client requests position on a side.
  261. // Client can issue multiple of these
  262. SideID iSide;
  263. END_FEDMSG
  264. DEFINE_FEDMSG(S, POSITIONREQ, 40) // server forwards request to appropriate person if permission required
  265. // This goes to everyone so that they know the player in question is in the lobby
  266. ShipID shipID;
  267. SideID iSide;
  268. END_FEDMSG
  269. DEFINE_FEDMSG(C, POSITIONACK, 41) // mission/team leader accepts or rejects person
  270. // everyone gets either a PLAYER_SIDE_CHANGE or a DELPOSITIONREQ
  271. ShipID shipID;
  272. SideID iSide;
  273. bool fAccepted;
  274. END_FEDMSG
  275. enum DelPositionReqReason
  276. {
  277. DPR_Rejected,
  278. DPR_Canceled,
  279. DPR_NoBase,
  280. DPR_TeamFull,
  281. DPR_TeamBalance,
  282. DPR_NoMission,
  283. DPR_BadPassword,
  284. DPR_LobbyLocked,
  285. DPR_InvalidRank,
  286. DPR_NoJoiners,
  287. DPR_NoDefections,
  288. DPR_WrongSquad,
  289. DPR_OutOfLives,
  290. DPR_Banned,
  291. DPR_SideGone,
  292. DPR_GameFull,
  293. DPR_PrivateGame,
  294. DPR_SidesLocked,
  295. DPR_SideDefeated,
  296. DPR_CantLeadSquad,
  297. DPR_ServerPaused,
  298. DPR_DuplicateLogin,
  299. DPR_Other
  300. };
  301. DEFINE_FEDMSG(CS, DELPOSITIONREQ, 42) // cancel/reject a pending request
  302. ShipID shipID;
  303. SideID iSide;
  304. DelPositionReqReason reason;
  305. END_FEDMSG
  306. DEFINE_FEDMSG(CS, LOCK_LOBBY, 43) // lock/unlock the lobby
  307. bool fLock;
  308. END_FEDMSG
  309. DEFINE_FEDMSG(CS, LOCK_SIDES, 44) // allow/disallow team changes
  310. bool fLock;
  311. END_FEDMSG
  312. DEFINE_FEDMSG(CS, PLAYER_READY, 45) // client is ready or not
  313. // Sent to everyone on team
  314. bool fReady;
  315. ShipID shipID;
  316. END_FEDMSG
  317. DEFINE_FEDMSG(S, TEAM_READY, 46) // team is ready or not
  318. // Server-generated based on whether everyone on team is ready, or leader has forced ready
  319. SideID iSide;
  320. bool fReady;
  321. END_FEDMSG
  322. DEFINE_FEDMSG(CS, FORCE_TEAM_READY, 47) // force team to be ready
  323. // Sent only by team leaders. Forwarded to everyone
  324. // if fForceReady==true, causes TEAM_READY to also be sent
  325. SideID iSide;
  326. bool fForceReady;
  327. END_FEDMSG
  328. DEFINE_FEDMSG(C, DOCKED, 48) // temporary until server detects docking
  329. // If stationID != NA, clients that can see this guy to receive a SHIP_DELETE, with SDR_DOCKED
  330. // If stationID == NA (undocked), other clients receive SHIP_INSTANCE as appropriate
  331. // *** stationID != NA is obsolete and no longer supported.
  332. // This is only used for undocking
  333. StationID stationID;
  334. END_FEDMSG
  335. DEFINE_FEDMSG(CS, CHANGE_TEAM_CIV, 51) // sent by team leader to change the civ of the side, and forwarded to everybody
  336. SideID iSide;
  337. CivID civID;
  338. END_FEDMSG
  339. DEFINE_FEDMSG(CS, AUTO_ACCEPT, 52) // sent by team leader, forwarded to all
  340. SideID iSide; //can be NA (for auto accept of team leaders) if sent by mission owner
  341. bool fAutoAccept;
  342. END_FEDMSG
  343. struct StationState
  344. {
  345. StationID stationID;
  346. BytePercentage bpHullFraction;
  347. BytePercentage bpShieldFraction;
  348. };
  349. DEFINE_FEDMSG(S, STATIONS_UPDATE, 57)
  350. FM_VAR_ITEM(rgStationStates);
  351. END_FEDMSG
  352. DEFINE_FEDMSG(S, STATION_CAPTURE, 58)
  353. StationID stationID;
  354. SideID sidOld;
  355. SideID sidNew;
  356. ShipID shipIDCredit;
  357. END_FEDMSG
  358. DEFINE_FEDMSG(S, STATION_DESTROYED, 59)
  359. StationID stationID;
  360. ShipID launcher;
  361. END_FEDMSG
  362. DEFINE_FEDMSG(S, MONEY_CHANGE, 60)
  363. Money dMoney;
  364. ShipID sidTo;
  365. ShipID sidFrom; //== NA means a server initiated change (cheat, probably)
  366. END_FEDMSG //== sidTo means a player initiated change (purchase, etc.)
  367. //otherwise means a transfer from -> to
  368. DEFINE_FEDMSG(S, DOCKED, 61)
  369. StationID stationID;
  370. END_FEDMSG
  371. struct SideEndgameInfo
  372. {
  373. char sideName[c_cbName];
  374. CivID civID;
  375. Color color;
  376. short cKills;
  377. short cDeaths;
  378. short cEjections;
  379. short cBaseKills;
  380. short cBaseCaptures;
  381. short cFlags;
  382. short cArtifacts;
  383. };
  384. DEFINE_FEDMSG(S, GAME_OVER, 62)
  385. FM_VAR_ITEM(szGameoverMessage);
  386. SideEndgameInfo rgSides[c_cSidesMax];
  387. SideID iSideWinner;
  388. char nNumSides;
  389. bool bEjectPods;
  390. END_FEDMSG
  391. struct PlayerEndgameInfo
  392. {
  393. char characterName[c_cbName];
  394. GameOverScoreObject scoring;
  395. PersistPlayerScoreObject stats;
  396. SideID sideId;
  397. };
  398. DEFINE_FEDMSG(S, GAME_OVER_PLAYERS, 63)
  399. FM_VAR_ITEM(rgPlayerInfo);
  400. END_FEDMSG
  401. typedef short BucketID; // uniquely identifies some TEAM bucket (not personal) that you can donate money to
  402. DEFINE_FEDMSG(C, BUCKET_DONATE, 64)
  403. Money moneyGiven;
  404. BucketID iBucket;
  405. END_FEDMSG
  406. DEFINE_FEDMSG(S, BUCKET_STATUS, 65)
  407. DWORD timeTotal;
  408. SideID sideID;
  409. Money moneyTotal;
  410. BucketID iBucket;
  411. END_FEDMSG
  412. enum BucketItemType
  413. {
  414. BIT_ShipType, BIT_Factory, BIT_StoragePit,
  415. };
  416. struct BucketData
  417. {
  418. BucketItemType bucketitemtype;
  419. Money cost;
  420. char szName[c_cbName];
  421. char szDescription[c_cbDescription];
  422. union
  423. {
  424. // BIT_ShipType
  425. struct
  426. {
  427. HullID hullidDrone;
  428. } drone;
  429. // BIT_Factory
  430. struct
  431. {
  432. //FactoryID factoryID;
  433. } factory;
  434. // ...
  435. };
  436. };
  437. DEFINE_FEDMSG(C, PLAYER_DONATE, 67)
  438. Money moneyGiven;
  439. ShipID shipID;
  440. END_FEDMSG
  441. DEFINE_FEDMSG(S, SIDE_INACTIVE, 68)
  442. SideID sideID;
  443. END_FEDMSG
  444. struct MissileLaunchData
  445. {
  446. Vector vecPosition;
  447. Vector vecForward;
  448. Vector vecVelocity;
  449. MissileID missileID;
  450. };
  451. DEFINE_FEDMSG(CS, FIRE_MISSILE, 70)
  452. FM_VAR_ITEM(missileLaunchData);
  453. float lock;
  454. Time timeFired;
  455. ExpendableTypeID missiletypeID;
  456. ShipID launcherID;
  457. SectorID clusterID;
  458. ObjectType targetType;
  459. ObjectID targetID;
  460. bool bDud;
  461. END_FEDMSG
  462. //Sent just to the side that changed
  463. DEFINE_FEDMSG(S, SIDE_TECH_CHANGE, 75)
  464. SideID sideID;
  465. TechTreeBitMask ttbmDevelopments;
  466. END_FEDMSG
  467. //Sent to everyone on a change
  468. DEFINE_FEDMSG(S, SIDE_ATTRIBUTE_CHANGE, 76)
  469. SideID sideID;
  470. GlobalAttributeSet gasAttributes;
  471. END_FEDMSG
  472. //Force a ship to eject a lifepod
  473. DEFINE_FEDMSG(S, EJECT, 77)
  474. ShipID shipID;
  475. Vector position;
  476. Vector velocity;
  477. Vector forward;
  478. Cookie cookie; //Used only by the receiving client
  479. END_FEDMSG
  480. //Used to tell the client about a new ship that they
  481. //are just getting information on (which gets sent
  482. //immediately when a ship undocks, ejects, or enters the sector)
  483. DEFINE_FEDMSG(S, SINGLE_SHIP_UPDATE, 78)
  484. ObjectType otTarget;
  485. ObjectID oidTarget;
  486. ServerSingleShipUpdate shipupdate;
  487. bool bIsRipcording;
  488. END_FEDMSG
  489. DEFINE_FEDMSG(C, SUICIDE, 80)
  490. END_FEDMSG
  491. DEFINE_FEDMSG(C, FIRE_EXPENDABLE, 82)
  492. EquipmentType et;
  493. END_FEDMSG
  494. DEFINE_FEDMSG(S, MISSILE_DESTROYED, 83)
  495. Vector position;
  496. SectorID clusterID;
  497. MissileID missileID;
  498. END_FEDMSG
  499. DEFINE_FEDMSG(S, MINE_DESTROYED, 84)
  500. SectorID clusterID;
  501. MineID mineID;
  502. END_FEDMSG
  503. DEFINE_FEDMSG(S, PROBE_DESTROYED, 85)
  504. SectorID clusterID;
  505. ProbeID probeID;
  506. END_FEDMSG
  507. DEFINE_FEDMSG(S, ASTEROID_DESTROYED, 86)
  508. SectorID clusterID;
  509. AsteroidID asteroidID;
  510. bool explodeF;
  511. END_FEDMSG
  512. DEFINE_FEDMSG(S, FIRE_EXPENDABLE, 87)
  513. ShipID launcherID;
  514. EquipmentType equipmentType;
  515. END_FEDMSG
  516. DEFINE_FEDMSG(S, TREASURE_SETS, 89)
  517. FM_VAR_ITEM(treasureSet); // array of TreasureSet. But ignore pargChance. You don't get (or need) that blob.
  518. // useage: TreasureSet * pargTreasureSet = FM_VAR_REF(pfmTreasureSets, treasureSet);
  519. short cTreasureSets;
  520. END_FEDMSG
  521. DEFINE_FEDMSG(S, SHIP_STATUS, 90)
  522. ShipID shipID;
  523. ShipStatus status;
  524. END_FEDMSG
  525. //Force the probe update structure to be packed to 3 bytes
  526. #pragma pack(push, 1)
  527. struct ProbeState
  528. {
  529. ProbeID probeID;
  530. BytePercentage bpFraction;
  531. };
  532. #pragma pack(pop)
  533. DEFINE_FEDMSG(S, PROBES_UPDATE, 92)
  534. FM_VAR_ITEM(rgProbeStates);
  535. END_FEDMSG
  536. DEFINE_FEDMSG(CS, ORDER_CHANGE, 93)
  537. ShipID shipID;
  538. ObjectID objectID;
  539. ObjectType objectType;
  540. CommandID commandID;
  541. Command command;
  542. END_FEDMSG
  543. DEFINE_FEDMSG(S, LEAVE_SHIP, 94)
  544. ShipID sidChild;
  545. END_FEDMSG
  546. DEFINE_FEDMSG(S, JOINED_MISSION, 95)
  547. ShipID shipID;
  548. float dtime; // time delta for client to *ADD* to its timeGetTime() timer
  549. Cookie cookie; // this is NOT a lobby cookie. It's an in-game cookie.
  550. DWORD dwCookie; // this IS the lobby cookie--this ugliness will go away when we have separate exes for each game
  551. END_FEDMSG
  552. DEFINE_FEDMSG(S, LOADOUT_CHANGE, 96)
  553. FM_VAR_ITEM(loadout);
  554. FM_VAR_ITEM(rgPassengers);
  555. ShipID sidShip;
  556. END_FEDMSG
  557. DEFINE_FEDMSG(C, ACTIVE_TURRET_UPDATE, 99)
  558. Time timeUpdate;
  559. ClientActiveTurretUpdate atu;
  560. END_FEDMSG
  561. DEFINE_FEDMSG(C, INACTIVE_TURRET_UPDATE, 100)
  562. END_FEDMSG
  563. DEFINE_FEDMSG(S, TELEPORT_ACK, 102)
  564. StationID stationID;
  565. bool bNewHull;
  566. END_FEDMSG
  567. DEFINE_FEDMSG(C, BOARD_SHIP, 103)
  568. ShipID sidParent;
  569. END_FEDMSG
  570. DEFINE_FEDMSG(C, VIEW_CLUSTER, 104)
  571. SectorID clusterID;
  572. ObjectType otTarget;
  573. ObjectID oidTarget;
  574. END_FEDMSG
  575. DEFINE_FEDMSG(S, KILL_SHIP, 105)
  576. ShipID shipID;
  577. ObjectType typeCredit;
  578. ObjectID idCredit;
  579. SideID sideidKiller;
  580. bool bKillCredit;
  581. bool bDeathCredit;
  582. END_FEDMSG
  583. DEFINE_FEDMSG(CS, SET_WINGID, 106)
  584. ShipID shipID;
  585. WingID wingID;
  586. bool bCommanded;
  587. END_FEDMSG
  588. DEFINE_FEDMSG(S, ICQ_CHAT_ACK, 107) // mirrored back by server with icqid when chat starts with "icq,"
  589. FM_VAR_ITEM(Message);
  590. int icqid;
  591. END_FEDMSG
  592. DEFINE_FEDMSG(CS, CHATBUOY, 108)
  593. FM_VAR_ITEM(Message);
  594. ChatData cd;
  595. DataBuoyIGC db;
  596. END_FEDMSG
  597. DEFINE_FEDMSG(S, CREATE_CHAFF, 109)
  598. Vector p0;
  599. Vector v0;
  600. Time time0;
  601. ExpendableTypeID etid;
  602. END_FEDMSG
  603. DEFINE_FEDMSG(S, MISSILE_SPOOFED, 110)
  604. MissileID missileID;
  605. END_FEDMSG
  606. DEFINE_FEDMSG(S, END_SPOOFING, 111)
  607. END_FEDMSG
  608. DEFINE_FEDMSG(C, AUTODONATE, 112)
  609. ShipID sidDonateTo;
  610. Money amount;
  611. END_FEDMSG
  612. DEFINE_FEDMSG(CS, MISSIONPARAMS, 113)
  613. MissionParams missionparams;
  614. END_FEDMSG
  615. DEFINE_FEDMSG(S, PAYDAY, 114)
  616. Money dMoney;
  617. END_FEDMSG
  618. DEFINE_FEDMSG(S, SET_MONEY, 115)
  619. Money money;
  620. ShipID shipID;
  621. END_FEDMSG
  622. DEFINE_FEDMSG(S, AUTODONATE, 116)
  623. ShipID sidDonateBy;
  624. ShipID sidDonateTo;
  625. Money amount;
  626. END_FEDMSG
  627. DEFINE_FEDMSG(C, MUTE, 117)
  628. ShipID shipID;
  629. bool bMute;
  630. END_FEDMSG
  631. DEFINE_FEDMSG(CS, SET_TEAM_LEADER, 121)
  632. // sent by a team leader to promote someone else to team leader and by the
  633. // server to notify everyone of a new team leader
  634. SideID sideID;
  635. ShipID shipID;
  636. END_FEDMSG
  637. DEFINE_FEDMSG(CS, SET_TEAM_INVESTOR, 122)
  638. // sent by a team leader to promote someone else to investor and by the
  639. // server to notify everyone of a new team investor
  640. SideID sideID;
  641. ShipID shipID;
  642. END_FEDMSG
  643. DEFINE_FEDMSG(CS, SET_MISSION_OWNER, 123)
  644. // sent when someone is promoted to be mission owner
  645. SideID sideID;
  646. ShipID shipID;
  647. END_FEDMSG
  648. enum QuitSideReason
  649. {
  650. QSR_LeaderBooted,
  651. QSR_OwnerBooted,
  652. QSR_AdminBooted,
  653. QSR_ServerShutdown,
  654. QSR_SquadChange,
  655. QSR_SideDestroyed,
  656. QSR_RankLimits,
  657. QSR_TeamSizeLimits,
  658. QSR_Quit,
  659. QSR_LinkDead,
  660. QSR_DuplicateRemoteLogon,
  661. QSR_DuplicateLocalLogon,
  662. QSR_DuplicateCDKey,
  663. QSR_SwitchingSides,
  664. QSR_RandomizeSides
  665. };
  666. #define QSRIsBoot(reason) ((reason) >= QSR_LeaderBooted && (reason) <= QSR_AdminBooted)
  667. DEFINE_FEDMSG(CS, QUIT_MISSION, 124)
  668. // removes a player from the mission. Can be sent by the team leader to boot
  669. // a player on their team, or by any player to boot themselves
  670. FM_VAR_ITEM(szMessageParam);
  671. ShipID shipID;
  672. QuitSideReason reason;
  673. END_FEDMSG
  674. DEFINE_FEDMSG(S, JOIN_SIDE, 125)
  675. SideID sideID;
  676. ShipID shipID;
  677. END_FEDMSG
  678. DEFINE_FEDMSG(CS, QUIT_SIDE, 126)
  679. FM_VAR_ITEM(szMessageParam);
  680. ShipID shipID;
  681. QuitSideReason reason;
  682. END_FEDMSG
  683. DEFINE_FEDMSG(S, ENTER_GAME, 128)
  684. // sent to the client once the client has all of the info it needs to start
  685. // playing in the current game (note: the count down may not have elapsed
  686. // yet).
  687. END_FEDMSG
  688. struct ReloadData
  689. {
  690. short amountTransfered;
  691. Mount mount; //always < 0
  692. };
  693. DEFINE_FEDMSG(CS, RELOAD, 129)
  694. FM_VAR_ITEM(rgReloads);
  695. ShipID shipID;
  696. END_FEDMSG
  697. /*
  698. DEFINE_FEDMSG(S, THREAT, 131)
  699. SectorID sectorID;
  700. ClusterWarning warning;
  701. END_FEDMSG
  702. */
  703. DEFINE_FEDMSG(S, GAME_STATE, 155)
  704. unsigned char conquest[c_cSidesMax];
  705. unsigned char territory[c_cSidesMax];
  706. unsigned char nFlags[c_cSidesMax];
  707. unsigned char nArtifacts[c_cSidesMax];
  708. END_FEDMSG
  709. DEFINE_FEDMSG(S, GAIN_FLAG, 156)
  710. SideID sideidFlag;
  711. ShipID shipidRecipient;
  712. END_FEDMSG
  713. DEFINE_FEDMSG(C, START_GAME, 157)
  714. END_FEDMSG
  715. DEFINE_FEDMSG(S, ACQUIRE_TREASURE, 162)
  716. TreasureCode treasureCode;
  717. ObjectID treasureID;
  718. short amount;
  719. END_FEDMSG
  720. DEFINE_FEDMSG(C, TREASURE_ACK, 163)
  721. Mount mountID; //== c_mountNA
  722. END_FEDMSG
  723. DEFINE_FEDMSG(S, ADD_PART, 164)
  724. ShipID shipID;
  725. PartData newPartData;
  726. END_FEDMSG
  727. DEFINE_FEDMSG(S, ENTER_LIFEPOD, 166)
  728. ShipID shipID;
  729. END_FEDMSG
  730. DEFINE_FEDMSG(S, LIGHT_SHIPS_UPDATE, 175)
  731. FM_VAR_ITEM(rgInactiveTurretUpdates);
  732. FM_VAR_ITEM(rgLightShipUpdates);
  733. END_FEDMSG
  734. DEFINE_FEDMSG(S, HEAVY_SHIPS_UPDATE, 176)
  735. FM_VAR_ITEM(rgActiveTurretUpdates);
  736. FM_VAR_ITEM(rgHeavyShipUpdates);
  737. Time timeReference;
  738. Vector positionReference;
  739. BytePercentage bpTargetHull;
  740. BytePercentage bpTargetShield;
  741. CompactShipFractions fractions;
  742. END_FEDMSG
  743. DEFINE_FEDMSG(S, VIEW_CLUSTER, 177)
  744. Vector position;
  745. SectorID clusterID;
  746. bool bUsePosition;
  747. END_FEDMSG
  748. DEFINE_FEDMSG(S, BOARD_NACK, 178)
  749. ShipID sidRequestedParent;
  750. END_FEDMSG
  751. #pragma pack(push, 1)
  752. struct AsteroidState
  753. {
  754. AsteroidID asteroidID;
  755. CompactOrientation co;
  756. short ore;
  757. BytePercentage bpFraction;
  758. };
  759. #pragma pack(pop)
  760. DEFINE_FEDMSG(S, ASTEROIDS_UPDATE, 179)
  761. FM_VAR_ITEM(rgAsteroidStates);
  762. END_FEDMSG
  763. DEFINE_FEDMSG(S, ASTEROID_DRAINED, 180)
  764. SectorID clusterID;
  765. AsteroidID asteroidID;
  766. END_FEDMSG
  767. DEFINE_FEDMSG(S, BUILDINGEFFECT_DESTROYED, 181)
  768. AsteroidID asteroidID;
  769. END_FEDMSG
  770. DEFINE_FEDMSG(CS, REQUEST_MONEY, 182)
  771. Money amount;
  772. ShipID shipidRequest;
  773. HullID hidFor;
  774. END_FEDMSG
  775. DEFINE_FEDMSG(S, SHIP_RESET, 183)
  776. ServerSingleShipUpdate shipupdate;
  777. Cookie cookie;
  778. END_FEDMSG
  779. DEFINE_FEDMSG(C, RIPCORD_REQUEST, 184)
  780. SectorID sidRipcord;
  781. END_FEDMSG
  782. DEFINE_FEDMSG(S, RIPCORD_ACTIVATE, 185)
  783. ShipID shipidRipcord;
  784. ObjectType otRipcord;
  785. ObjectID oidRipcord;
  786. SectorID sidRipcord;
  787. END_FEDMSG
  788. DEFINE_FEDMSG(S, RIPCORD_DENIED, 186)
  789. END_FEDMSG
  790. DEFINE_FEDMSG(S, RIPCORD_ABORTED, 187)
  791. ShipID shipidRipcord;
  792. END_FEDMSG
  793. DEFINE_FEDMSG(S, WARP_BOMB, 188)
  794. Time timeExplosion;
  795. WarpID warpidBombed;
  796. ExpendableTypeID expendableidMissile;
  797. END_FEDMSG
  798. DEFINE_FEDMSG(S, PROMOTE, 189)
  799. ShipID shipidPromoted;
  800. END_FEDMSG
  801. DEFINE_FEDMSG(C, PROMOTE, 190)
  802. Mount mountidPromoted;
  803. END_FEDMSG
  804. DEFINE_FEDMSG(S, CREATE_BUCKETS, 191)
  805. TechTreeBitMask ttbmDevelopments;
  806. TechTreeBitMask ttbmInitial;
  807. END_FEDMSG
  808. DEFINE_FEDMSG(S, RELAUNCH_SHIP, 192)
  809. FM_VAR_ITEM(loadout);
  810. ShipID shipID;
  811. ShipID carrierID;
  812. Vector position;
  813. Vector velocity;
  814. CompactOrientation orientation;
  815. Cookie cookie;
  816. END_FEDMSG
  817. #endif // _MESSAGES_