Added default weaponset to frontlib hwconsts flibqtfrontend
authorMedo <smaxein@googlemail.com>
Tue, 27 Nov 2012 21:21:14 +0100
branchflibqtfrontend
changeset 8132 f68b43cf510f
parent 8130 4cab13c82b4e
child 8135 0401d7c216e0
child 8137 adb1de7a3cd9
Added default weaponset to frontlib hwconsts Now the weaponset create function can actually do what it promises and create a default set instead of an empty one :)
project_files/frontlib/hwconsts.h
project_files/frontlib/model/weapon.c
--- a/project_files/frontlib/hwconsts.h	Tue Nov 27 00:29:41 2012 +0400
+++ b/project_files/frontlib/hwconsts.h	Tue Nov 27 21:21:14 2012 +0100
@@ -45,6 +45,10 @@
 #define MULTIPLAYER_SCRIPT_PATH "Scripts/Multiplayer/"
 
 #define WEAPONS_COUNT 56
+#define AMMOLINE_DEFAULT_QT     "93919294221991210322351110012010000002111101010111110101"
+#define AMMOLINE_DEFAULT_PROB   "04050405416006555465544647765766666661555101011154110101"
+#define AMMOLINE_DEFAULT_DELAY  "00000000000002055000000400070040000000002200000006000000"
+#define AMMOLINE_DEFAULT_CRATE  "13111103121111111231141111111111111112111111011111110101"
 
 // TODO allow frontend to override these?
 /* A merge of mikade/bugq colours w/ a bit of channel feedback */
--- a/project_files/frontlib/model/weapon.c	Tue Nov 27 00:29:41 2012 +0400
+++ b/project_files/frontlib/model/weapon.c	Tue Nov 27 21:21:14 2012 +0100
@@ -56,10 +56,10 @@
 		if(newSet) {
 			newSet->name = flib_strdupnull(name);
 			if(newSet->name) {
-				setField(newSet->loadout, "", 0, false);
-				setField(newSet->crateprob, "", 0, false);
-				setField(newSet->crateammo, "", 0, false);
-				setField(newSet->delay, "", 0, false);
+				setField(newSet->loadout, AMMOLINE_DEFAULT_QT, 0, false);
+				setField(newSet->crateprob, AMMOLINE_DEFAULT_PROB, 0, true);
+				setField(newSet->crateammo, AMMOLINE_DEFAULT_CRATE, 0, true);
+				setField(newSet->delay, AMMOLINE_DEFAULT_DELAY, 0, true);
 				result = newSet;
 				newSet = NULL;
 			}