version 1.4 | | version 1.5 |
---|
| | |
cfapiObject_set_property( &val, ob, CFAPI_OBJECT_PROP_WEIGHT, weight ); | | cfapiObject_set_property( &val, ob, CFAPI_OBJECT_PROP_WEIGHT, weight ); |
} | | } |
| | |
| | void cf_object_set_weight_limit( object* ob, int weight_limit ) |
| | { |
| | int val; |
| | cfapiObject_set_property( &val, ob, CFAPI_OBJECT_PROP_WEIGHT_LIMIT, weight_limit ); |
| | } |
| | |
int cf_object_get_weight( object* ob ) | | int cf_object_get_weight( object* ob ) |
{ | | { |
int val; | | int val; |
return *( int* )cfapiObject_get_property( &val, ob, CFAPI_OBJECT_PROP_WEIGHT ); | | return *( int* )cfapiObject_get_property( &val, ob, CFAPI_OBJECT_PROP_WEIGHT ); |
} | | } |
| | |
| | int cf_object_get_weight_limit( object* ob ) |
| | { |
| | int val; |
| | int *dummy; |
| | dummy = cfapiObject_get_property( &val, ob, CFAPI_OBJECT_PROP_WEIGHT_LIMIT ); |
| | return *dummy; |
| | } |
| | |
/** | | /** |
* @return -1=nrof is invalid, 0=nrof is ok# | | * @return -1=nrof is invalid, 0=nrof is ok# |
*/ | | */ |