Fixed flib_weaponset_create creating an empty weaponset (for real this time :P) flibqtfrontend
authorMedo <smaxein@googlemail.com>
Fri, 30 Nov 2012 15:16:14 +0100
branchflibqtfrontend
changeset 8135 0401d7c216e0
parent 8132 f68b43cf510f
child 8141 6482875b0d97
Fixed flib_weaponset_create creating an empty weaponset (for real this time :P)
project_files/frontlib/model/weapon.c
--- a/project_files/frontlib/model/weapon.c	Tue Nov 27 21:21:14 2012 +0100
+++ b/project_files/frontlib/model/weapon.c	Fri Nov 30 15:16:14 2012 +0100
@@ -56,10 +56,10 @@
 		if(newSet) {
 			newSet->name = flib_strdupnull(name);
 			if(newSet->name) {
-				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);
+				setField(newSet->loadout, AMMOLINE_DEFAULT_QT, strlen(AMMOLINE_DEFAULT_QT), false);
+				setField(newSet->crateprob, AMMOLINE_DEFAULT_PROB, strlen(AMMOLINE_DEFAULT_PROB), true);
+				setField(newSet->crateammo, AMMOLINE_DEFAULT_CRATE, strlen(AMMOLINE_DEFAULT_CRATE), true);
+				setField(newSet->delay, AMMOLINE_DEFAULT_DELAY, strlen(AMMOLINE_DEFAULT_DELAY), true);
 				result = newSet;
 				newSet = NULL;
 			}