Skip to content

Commit

Permalink
fixes bug
Browse files Browse the repository at this point in the history
  • Loading branch information
actboy168 authored and junjie020 committed Jun 27, 2022
1 parent ddcfb83 commit 0db51a9
Show file tree
Hide file tree
Showing 5 changed files with 142 additions and 5 deletions.
2 changes: 1 addition & 1 deletion 3rd/ant
Submodule ant updated from f331cd to c374d3
21 changes: 21 additions & 0 deletions CppProperties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"configurations": [
{
"inheritEnvironments": [
"msvc_x64"
],
"name": "x64-Debug",
"includePath": [
"${env.INCLUDE}",
"${workspaceRoot}\\**"
],
"defines": [
"WIN32",
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"intelliSenseMode": "windows-msvc-x64"
}
]
}
4 changes: 1 addition & 3 deletions clibs/gameplay/src/core/fluidflow.c
Original file line number Diff line number Diff line change
Expand Up @@ -470,11 +470,9 @@ attempt_flow(struct fluidflow_network *net, int idx) {
int n = i;
if (total > fluid) {
int radio = FIXSHIFT * fluid / total;
for (i=0;i<n-1;i++) {
for (i=0;i<n;i++) {
f[i] = f[i] * radio / FIXSHIFT;
fluid -= f[i];
}
f[i] = fluid;
}
for (i=0;i<n;i++) {
// printf("Attempt flow %d -> %d : %d\n", p->id, net->p[p->downlink[i]].id, f[i]);
Expand Down
2 changes: 1 addition & 1 deletion packages/gameplay/entity_visitor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ return function (ecs, c)
return
end
local proxy = setmetatable({id=id}, proxy_mt)
entity[id] = proxy
rawset(entity, id, proxy)
return proxy
end

Expand Down
118 changes: 118 additions & 0 deletions vaststars.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
{
"folders": [
{
"path": "."
},
{
"path": "..\\ant"
}
],
"settings": {
"files.associations": {
"*.sc": "glsl",
"*.make": "makefile",
"*.rml": "html",
"*.ecs": "lua",
"queue": "c",
"stack": "c",
"xutility": "cpp",
"algorithm": "cpp",
"any": "cpp",
"array": "cpp",
"atomic": "cpp",
"bit": "cpp",
"bitset": "cpp",
"cctype": "cpp",
"charconv": "cpp",
"chrono": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"codecvt": "cpp",
"compare": "cpp",
"complex": "cpp",
"concepts": "cpp",
"condition_variable": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"deque": "cpp",
"exception": "cpp",
"filesystem": "cpp",
"format": "cpp",
"forward_list": "cpp",
"fstream": "cpp",
"functional": "cpp",
"future": "cpp",
"hash_map": "cpp",
"hash_set": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"ios": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"iterator": "cpp",
"limits": "cpp",
"list": "cpp",
"locale": "cpp",
"map": "cpp",
"memory": "cpp",
"mutex": "cpp",
"new": "cpp",
"numbers": "cpp",
"numeric": "cpp",
"optional": "cpp",
"ostream": "cpp",
"random": "cpp",
"ratio": "cpp",
"regex": "cpp",
"set": "cpp",
"shared_mutex": "cpp",
"span": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"stop_token": "cpp",
"streambuf": "cpp",
"string": "cpp",
"system_error": "cpp",
"thread": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"typeindex": "cpp",
"typeinfo": "cpp",
"unordered_map": "cpp",
"unordered_set": "cpp",
"utility": "cpp",
"valarray": "cpp",
"variant": "cpp",
"vector": "cpp",
"xfacet": "cpp",
"xhash": "cpp",
"xiosbase": "cpp",
"xlocale": "cpp",
"xlocbuf": "cpp",
"xlocinfo": "cpp",
"xlocmes": "cpp",
"xlocmon": "cpp",
"xlocnum": "cpp",
"xloctime": "cpp",
"xmemory": "cpp",
"xstddef": "cpp",
"xstring": "cpp",
"xtr1common": "cpp",
"xtree": "cpp",
"*.rh": "cpp",
"*.idl": "cpp",
"stdlib.h": "c",
"string.h": "c",
"sort_r.h": "c",
"stdio.h": "c"
},
"lua.debug.variables.showIntegerAsHex": false
}
}

0 comments on commit 0db51a9

Please sign in to comment.