180 |
} |
} |
181 |
|
|
182 |
/////////////////////////////////////////////////////////////////////////// |
/////////////////////////////////////////////////////////////////////////// |
183 |
|
// built-in script function: in_range() |
184 |
|
|
185 |
|
VMFnResult* CoreVMFunction_in_range::exec(VMFnArgs* args) { |
186 |
|
int i = args->arg(0)->asInt()->evalInt(); |
187 |
|
int lo = args->arg(1)->asInt()->evalInt(); |
188 |
|
int hi = args->arg(2)->asInt()->evalInt(); |
189 |
|
if (lo > hi) { // swap lo and hi |
190 |
|
int tmp = lo; |
191 |
|
lo = hi; |
192 |
|
hi = tmp; |
193 |
|
} |
194 |
|
return successResult(i >= lo && i <= hi); |
195 |
|
} |
196 |
|
|
197 |
|
/////////////////////////////////////////////////////////////////////////// |
198 |
// built-in script function: sh_left() |
// built-in script function: sh_left() |
199 |
|
|
200 |
VMFnResult* CoreVMFunction_sh_left::exec(VMFnArgs* args) { |
VMFnResult* CoreVMFunction_sh_left::exec(VMFnArgs* args) { |